diff options
author | Valery Sizov <valery@gitlab.com> | 2017-03-07 13:42:17 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-03-07 13:42:17 +0200 |
commit | a0108c6925239aab8164c28851d19f5d01eb8321 (patch) | |
tree | b7c03d99ed3684834bae06b5e86641fcaa3bfdfb /spec/models/concerns | |
parent | 710e4df933ba2070dcc104a18de834c23dd1e5be (diff) | |
download | gitlab-ce-a0108c6925239aab8164c28851d19f5d01eb8321.tar.gz |
Address review comments
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/relative_positioning_spec.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/spec/models/concerns/relative_positioning_spec.rb b/spec/models/concerns/relative_positioning_spec.rb index 69f295f725b..81cc1fc8238 100644 --- a/spec/models/concerns/relative_positioning_spec.rb +++ b/spec/models/concerns/relative_positioning_spec.rb @@ -4,6 +4,7 @@ describe Issue, 'RelativePositioning' do let(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } let(:issue1) { create(:issue, project: project) } + let(:new_issue) { create(:issue, project: project) } before do [issue, issue1].each do |issue| @@ -36,8 +37,6 @@ describe Issue, 'RelativePositioning' do describe '#move_to_end' do it 'moves issue to the end' do - new_issue = create :issue, project: project - new_issue.move_to_end expect(new_issue.relative_position).to be > issue1.relative_position @@ -46,8 +45,6 @@ describe Issue, 'RelativePositioning' do describe '#move_between' do it 'positions issue between two other' do - new_issue = create :issue, project: project - new_issue.move_between(issue, issue1) expect(new_issue.relative_position).to be > issue.relative_position @@ -55,23 +52,18 @@ describe Issue, 'RelativePositioning' do end it 'positions issue between on top' do - new_issue = create :issue, project: project - new_issue.move_between(nil, issue) expect(new_issue.relative_position).to be < issue.relative_position end it 'positions issue between to end' do - new_issue = create :issue, project: project - new_issue.move_between(issue1, nil) expect(new_issue.relative_position).to be > issue1.relative_position end it 'positions issues even when after and before positions are the same' do - new_issue = create :issue, project: project issue1.update relative_position: issue.relative_position new_issue.move_between(issue, issue1) |