summaryrefslogtreecommitdiff
path: root/spec/serializers/diffs_entity_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 18:09:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 18:09:16 +0000
commit80e9fdc9682cfbcfb9202a2733605a6a6bd23f05 (patch)
tree168375ea13d1a1f01d4cbcf6f0513fc9883e9477 /spec/serializers/diffs_entity_spec.rb
parent5372e109c0660e4670aa987568a51082beca1b3c (diff)
downloadgitlab-ce-80e9fdc9682cfbcfb9202a2733605a6a6bd23f05.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/diffs_entity_spec.rb')
-rw-r--r--spec/serializers/diffs_entity_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/serializers/diffs_entity_spec.rb b/spec/serializers/diffs_entity_spec.rb
index b42240037df..482f9e76c62 100644
--- a/spec/serializers/diffs_entity_spec.rb
+++ b/spec/serializers/diffs_entity_spec.rb
@@ -45,26 +45,26 @@ describe DiffsEntity do
let(:commit) { commits.third }
it 'includes commit references for previous and next' do
- expect(subject[:commit][:prev_commit_id]).to eq(commits.second.id)
- expect(subject[:commit][:next_commit_id]).to eq(commits.fourth.id)
+ expect(subject[:commit][:next_commit_id]).to eq(commits.second.id)
+ expect(subject[:commit][:prev_commit_id]).to eq(commits.fourth.id)
end
end
context "when the passed commit is the first in the group" do
let(:commit) { commits.first }
- it 'includes commit references for nil and next' do
- expect(subject[:commit][:prev_commit_id]).to be_nil
- expect(subject[:commit][:next_commit_id]).to eq(commits.second.id)
+ it 'includes commit references for nil and previous commit' do
+ expect(subject[:commit][:next_commit_id]).to be_nil
+ expect(subject[:commit][:prev_commit_id]).to eq(commits.second.id)
end
end
context "when the passed commit is the last in the group" do
let(:commit) { commits.last }
- it 'includes commit references for previous and nil' do
- expect(subject[:commit][:prev_commit_id]).to eq(commits[-2].id)
- expect(subject[:commit][:next_commit_id]).to be_nil
+ it 'includes commit references for the next and nil' do
+ expect(subject[:commit][:next_commit_id]).to eq(commits[-2].id)
+ expect(subject[:commit][:prev_commit_id]).to be_nil
end
end
end