diff options
Diffstat (limited to 'spec/models/note_spec.rb')
| -rw-r--r-- | spec/models/note_spec.rb | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index cd3c868ecc5..5b6f177ebb2 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -142,4 +142,21 @@ describe Note, models: true do        expect(Note.grouped_awards.first.last).to match_array(Note.all)      end    end + +  describe "editable?" do +    it "returns true" do +      note = build(:note) +      expect(note.editable?).to be_truthy +    end + +    it "returns false" do +      note = build(:note, system: true) +      expect(note.editable?).to be_falsy +    end + +    it "returns false" do +      note = build(:note, is_award: true, note: "smiley") +      expect(note.editable?).to be_falsy +    end +  end  end | 
