diff options
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 09caa2c9991..b214074fdce 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -696,25 +696,4 @@ describe Note do note.destroy! end end - - describe '#specialize!' do - let(:note) { build(:note) } - let(:role) { Note::SpecialRole::FIRST_TIME_CONTRIBUTOR } - - it 'should set special role without a block' do - expect { note.specialize!(role) }.to change { note.special_role }.from(nil).to(role) - end - - it 'should set special role with a truthy block' do - tautology = -> (*) { true } - - expect { note.specialize!(role, &tautology) }.to change { note.special_role }.from(nil).to(role) - end - - it 'should not set special role with a falsey block' do - contradiction = -> (*) { false } - - expect { note.specialize!(role, &contradiction) }.not_to change { note.special_role } - end - end end |