Commit diff fixes, per-line comments fixed
This commit is contained in:
parent
73efb83791
commit
b4cc04d7e1
5 changed files with 66 additions and 83 deletions
|
@ -42,27 +42,13 @@ describe Note do
|
|||
:project => project,
|
||||
:noteable_id => commit.id,
|
||||
:noteable_type => "Commit",
|
||||
:line_code => "OLD_1_23"
|
||||
:line_code => "0_16_1"
|
||||
end
|
||||
|
||||
it "should save a valid note" do
|
||||
@note.noteable_id.should == commit.id
|
||||
@note.target.id.should == commit.id
|
||||
end
|
||||
|
||||
it { @note.line_type_id.should == "OLD" }
|
||||
it { @note.line_file_id.should == 1 }
|
||||
it { @note.line_number.should == 23 }
|
||||
|
||||
it { @note.for_line?(1, 23, 34).should be_true }
|
||||
it { @note.for_line?(1, 23, nil).should be_true }
|
||||
it { @note.for_line?(1, 23, 0).should be_true }
|
||||
it { @note.for_line?(1, 23, 23).should be_true }
|
||||
|
||||
it { @note.for_line?(1, nil, 34).should be_false }
|
||||
it { @note.for_line?(1, 24, nil).should be_false }
|
||||
it { @note.for_line?(1, 24, 0).should be_false }
|
||||
it { @note.for_line?(1, 24, 23).should be_false }
|
||||
end
|
||||
|
||||
describe :authorization do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue