summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:48 +0000
commita89cb5cbdd832d4d9e80517973aceda6bc0a3856 (patch)
tree574475bd0901a2f8906d36a4728b8bbb95b41e1c /spec/models/concerns
parent0d6fa033121a9bef708b8f2de186c4034c61d4a3 (diff)
downloadgitlab-ce-a89cb5cbdd832d4d9e80517973aceda6bc0a3856.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/avatarable_spec.rb6
-rw-r--r--spec/models/concerns/routable_spec.rb2
-rw-r--r--spec/models/concerns/triggerable_hooks_spec.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/concerns/avatarable_spec.rb b/spec/models/concerns/avatarable_spec.rb
index c750be6b75c..100953549ea 100644
--- a/spec/models/concerns/avatarable_spec.rb
+++ b/spec/models/concerns/avatarable_spec.rb
@@ -48,14 +48,14 @@ describe Avatarable do
end
it 'calls local_url twice for path and URLs' do
- expect(project.avatar).to receive(:local_url).exactly(2).times.and_call_original
+ expect(project.avatar).to receive(:local_url).twice.and_call_original
expect(project.avatar_path(only_path: true)).to eq(avatar_path)
expect(project.avatar_path(only_path: false)).to eq(avatar_url)
end
it 'calls local_url twice for different sizes' do
- expect(project.avatar).to receive(:local_url).exactly(2).times.and_call_original
+ expect(project.avatar).to receive(:local_url).twice.and_call_original
expect(project.avatar_path).to eq(avatar_path)
expect(project.avatar_path(size: 40)).to eq(avatar_path + "?width=40")
@@ -64,7 +64,7 @@ describe Avatarable do
it 'handles unpersisted objects' do
new_project = build(:project, :with_avatar)
path = [relative_url_root, new_project.avatar.local_url].join
- expect(new_project.avatar).to receive(:local_url).exactly(2).times.and_call_original
+ expect(new_project.avatar).to receive(:local_url).twice.and_call_original
2.times do
expect(new_project.avatar_path).to eq(path)
diff --git a/spec/models/concerns/routable_spec.rb b/spec/models/concerns/routable_spec.rb
index f78a089bc2e..c891fdcb6b5 100644
--- a/spec/models/concerns/routable_spec.rb
+++ b/spec/models/concerns/routable_spec.rb
@@ -58,7 +58,7 @@ describe Group, 'Routable' do
end
end
- context '.find_by_full_path' do
+ describe '.find_by_full_path' do
let!(:nested_group) { create(:group, parent: group) }
context 'without any redirect routes' do
diff --git a/spec/models/concerns/triggerable_hooks_spec.rb b/spec/models/concerns/triggerable_hooks_spec.rb
index ac1bc51d950..10a6c1aa821 100644
--- a/spec/models/concerns/triggerable_hooks_spec.rb
+++ b/spec/models/concerns/triggerable_hooks_spec.rb
@@ -49,7 +49,7 @@ RSpec.describe TriggerableHooks do
TestableHook.create!(url: 'http://example2.com', push_events: true)
filter1 = double(:filter1)
filter2 = double(:filter2)
- allow(ActiveHookFilter).to receive(:new).exactly(2).times.and_return(filter1, filter2)
+ allow(ActiveHookFilter).to receive(:new).twice.and_return(filter1, filter2)
expect(filter1).to receive(:matches?).and_return(true)
expect(filter2).to receive(:matches?).and_return(false)