diff options
author | George Koltsov <gkoltsov@gitlab.com> | 2019-08-02 18:34:06 +0100 |
---|---|---|
committer | George Koltsov <gkoltsov@gitlab.com> | 2019-08-12 11:16:17 +0100 |
commit | 13adfb3e7a6458668fd27795dcf8e74004a5860c (patch) | |
tree | b823a8072ddaaef7d0d2da4f44cb28b41839552c /spec | |
parent | 83cb24358eaf1361b7d7ac0500e35e1392917909 (diff) | |
download | gitlab-ce-13adfb3e7a6458668fd27795dcf8e74004a5860c.tar.gz |
Add bitbucket_server/client_spec.rb spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/bitbucket_server/client_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/bitbucket_server/client_spec.rb b/spec/lib/bitbucket_server/client_spec.rb index 988710b7c4d..aa0217856ee 100644 --- a/spec/lib/bitbucket_server/client_spec.rb +++ b/spec/lib/bitbucket_server/client_spec.rb @@ -58,6 +58,17 @@ describe BitbucketServer::Client do subject.repos(page_offset: 10, limit: 25) end + + context 'when filter param is passed' do + let(:filter) { 'test' } + let(:expected_path) { "#{path}?name=#{filter}" } + + it 'requests a collection with filter applied' do + expect(BitbucketServer::Paginator).to receive(:new).with(anything, expected_path, :repo, page_offset: 0, limit: nil) + + subject.repos(filter: filter) + end + end end describe '#create_branch' do |