summaryrefslogtreecommitdiff
path: root/spec/workers/post_receive_spec.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-08-09 15:41:07 -0700
committerStan Hu <stanhu@gmail.com>2019-08-09 15:41:07 -0700
commitafe867921cab046a34bc463840c6e9f5d51f1f70 (patch)
treedae8e191eb1ba98217f277cb1326297ee84df82b /spec/workers/post_receive_spec.rb
parentd96c24d81590dd6da237f131d4c074b70e64e030 (diff)
downloadgitlab-ce-afe867921cab046a34bc463840c6e9f5d51f1f70.tar.gz
Rename branches_exist? -> includes_branches?65803-invalidate-branches-cache-on-refresh
Diffstat (limited to 'spec/workers/post_receive_spec.rb')
-rw-r--r--spec/workers/post_receive_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb
index 01ccae194fb..081d95d4d79 100644
--- a/spec/workers/post_receive_spec.rb
+++ b/spec/workers/post_receive_spec.rb
@@ -61,16 +61,21 @@ describe PostReceive do
end
context "branches" do
- let(:changes) { '123456 789012 refs/heads/tést' }
+ let(:changes) do
+ <<~EOF
+ '123456 789012 refs/heads/tést1'
+ '123456 789012 refs/heads/tést2'
+ EOF
+ end
it 'expires the branches cache' do
- expect(project.repository).to receive(:expire_branches_cache)
+ expect(project.repository).to receive(:expire_branches_cache).once
described_class.new.perform(gl_repository, key_id, base64_changes)
end
it 'calls Git::BranchPushService' do
- expect_next_instance_of(Git::BranchPushService) do |service|
+ expect_any_instance_of(Git::BranchPushService) do |service|
expect(service).to receive(:execute).and_return(true)
end