diff options
Diffstat (limited to 'spec/models/notification_recipient_spec.rb')
-rw-r--r-- | spec/models/notification_recipient_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/models/notification_recipient_spec.rb b/spec/models/notification_recipient_spec.rb index 13fe47799ed..b06f4558099 100644 --- a/spec/models/notification_recipient_spec.rb +++ b/spec/models/notification_recipient_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require "spec_helper" describe NotificationRecipient do let(:user) { create(:user) } @@ -7,15 +7,15 @@ describe NotificationRecipient do subject(:recipient) { described_class.new(user, :watch, target: target, project: project) } - it 'denies access to a target when cross project access is denied' do + it "denies access to a target when cross project access is denied" do allow(Ability).to receive(:allowed?).and_call_original expect(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(false) expect(recipient.has_access?).to be_falsy end - context '#notification_setting' do - context 'for child groups', :nested_groups do + context "#notification_setting" do + context "for child groups", :nested_groups do let!(:moved_group) { create(:group) } let(:group) { create(:group) } let(:sub_group_1) { create(:group, parent: group) } @@ -30,7 +30,7 @@ describe NotificationRecipient do moved_group.reload end - context 'when notification setting is global' do + context "when notification setting is global" do before do user.notification_settings_for(group).global! user.notification_settings_for(sub_group_1).mention! @@ -38,12 +38,12 @@ describe NotificationRecipient do user.notification_settings_for(moved_group).global! end - it 'considers notification setting from the first parent without global setting' do + it "considers notification setting from the first parent without global setting" do expect(subject.notification_setting.source).to eq(sub_group_1) end end - context 'when notification setting is not global' do + context "when notification setting is not global" do before do user.notification_settings_for(group).global! user.notification_settings_for(sub_group_1).mention! @@ -51,7 +51,7 @@ describe NotificationRecipient do user.notification_settings_for(moved_group).disabled! end - it 'considers notification setting from lowest group member in hierarchy' do + it "considers notification setting from lowest group member in hierarchy" do expect(subject.notification_setting.source).to eq(moved_group) end end |