Files
nairobi/spec/components/subscriptions/edit_component_spec.rb
taitus 7bd1f15f37 Improve translation for the notification of comments
Currently the translation:
"Notify me by email when someone comments on my proposals or debates"
It only refers to proposals and debates, but actually it also refers to budget
investments, topics and polls.
2022-01-21 20:21:52 +01:00

19 lines
896 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 by email website relevant information", 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