Files
grecia/spec/components/subscriptions/edit_component_spec.rb
Javi Martín 647a7dc435 Fix text to subscribe to a newsletter
In English, circumstancial complements usually go after the direct
complement.
2022-06-01 14:27:33 +02:00

19 lines
888 B
Ruby

require "rails_helper"
describe Subscriptions::EditComponent do
let(:user) { create(:user, subscriptions_token: SecureRandom.base58(32)) }
let(:component) { Subscriptions::EditComponent.new(user) }
it "renders checkboxes to change the subscriptions preferences" do
render_inline component
expect(page).to have_content "Notifications"
expect(page).to have_field "Notify me by email when someone comments on my contents", type: :checkbox
expect(page).to have_field "Notify me by email when someone replies to my comments", type: :checkbox
expect(page).to have_field "Receive relevant information by email", type: :checkbox
expect(page).to have_field "Receive a summary of proposal notifications", type: :checkbox
expect(page).to have_field "Receive emails about direct messages", type: :checkbox
expect(page).to have_button "Save changes"
end
end