diff options
Diffstat (limited to 'spec/models/note_spec.rb')
| -rw-r--r-- | spec/models/note_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 8b622d5b8c5..514b6202b74 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -85,9 +85,19 @@ describe Note do noteable_type: "Commit" end + it "should be accessible through #noteable" do + @note.noteable_id.should == commit.id + @note.noteable.should be_a(Commit) + @note.noteable.should == commit + end + it "should save a valid note" do @note.noteable_id.should == commit.id - @note.target.id.should == commit.id + @note.noteable == commit + end + + it "should be recognized by #for_commit?" do + @note.should be_for_commit end end @@ -101,7 +111,11 @@ describe Note do it "should save a valid note" do @note.noteable_id.should == commit.id - @note.target.id.should == commit.id + @note.noteable.id.should == commit.id + end + + it "should be recognized by #for_diff_line?" do + @note.should be_for_diff_line end end |
