summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-12-15 21:25:23 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-12-15 21:25:23 +0000
commit223cb3788a744f9b1b92959d3337000358db108b (patch)
tree77858e7ec0e2a731ddb7791f99d75ef4c23b4b54 /spec/models/repository_spec.rb
parentb3606cff38b9defc764706ed6529a9e27dcf4847 (diff)
parenta1a323392d4f0cb59eab2e215fa4010b84fc122d (diff)
downloadgitlab-ce-41117-empty-state.tar.gz
Merge branch 'master' into 41117-empty-state41117-empty-state
* master: (71 commits) Update CHANGELOG.md for 10.2.5 Change CI config to use new base image fix issue #39843 Incorrect guidance stating blocked users will be removed from groups and projects as members Add changelog entry Update tests for toggle design change Update toggle styles to use icons Use icons instead of string labels for toggles Fix Rubocop offense in QA project specs Add SAST docs Fix UX issues in system info page Update svg package version Make sure user email is read only when synced with LDAP Add note about automatic pipelines when enabling Auto DevOps Backport changes from EE Docs update documentation guidelines Don't use Markdown cache for stubbed settings in specs Fix remaining calls to GitLab QA factories Rename QA scenarios to make factory concept explicit Export JS classes as modules Make rubocop happy ...
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 2c0d4db3307..799d99c0369 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -59,12 +59,18 @@ describe Repository do
end
describe 'tags_sorted_by' do
- context 'name' do
- subject { repository.tags_sorted_by('name').map(&:name) }
+ context 'name_desc' do
+ subject { repository.tags_sorted_by('name_desc').map(&:name) }
it { is_expected.to eq(['v1.1.0', 'v1.0.0']) }
end
+ context 'name_asc' do
+ subject { repository.tags_sorted_by('name_asc').map(&:name) }
+
+ it { is_expected.to eq(['v1.0.0', 'v1.1.0']) }
+ end
+
context 'updated' do
let(:tag_a) { repository.find_tag('v1.0.0') }
let(:tag_b) { repository.find_tag('v1.1.0') }
@@ -1007,7 +1013,7 @@ describe Repository do
it 'runs without errors' do
# old_rev is an ancestor of new_rev
- expect(repository.rugged.merge_base(old_rev, new_rev)).to eq(old_rev)
+ expect(repository.merge_base(old_rev, new_rev)).to eq(old_rev)
# old_rev is not a direct ancestor (parent) of new_rev
expect(repository.rugged.lookup(new_rev).parent_ids).not_to include(old_rev)
@@ -1029,7 +1035,7 @@ describe Repository do
it 'raises an exception' do
# The 'master' branch is NOT an ancestor of new_rev.
- expect(repository.rugged.merge_base(old_rev, new_rev)).not_to eq(old_rev)
+ expect(repository.merge_base(old_rev, new_rev)).not_to eq(old_rev)
# Updating 'master' to new_rev would lose the commits on 'master' that
# are not contained in new_rev. This should not be allowed.