diff options
| author | Douwe Maan <douwe@gitlab.com> | 2015-02-11 23:14:19 +0100 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2015-02-11 23:14:19 +0100 |
| commit | f92a9c5a5f3f1cfc8a827abcf67a508133f39f04 (patch) | |
| tree | d2dbd4b2059f28cdb73a9f3a42b96d70d914642c /spec | |
| parent | f11e1bf914854e53217ece1ec6f8947f2894a1c7 (diff) | |
| download | gitlab-shell-f92a9c5a5f3f1cfc8a827abcf67a508133f39f04.tar.gz | |
Refactor: Remove #tap for readability and performance and DRY up get/post.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/gitlab_net_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb index 5e6e4de..e9a9d03 100644 --- a/spec/gitlab_net_spec.rb +++ b/spec/gitlab_net_spec.rb @@ -139,12 +139,13 @@ describe GitlabNet, vcr: true do let(:user) { 'user' } let(:password) { 'password' } let(:url) { URI 'http://localhost/' } - subject { gitlab_net.send :http_request_for, url } + subject { gitlab_net.send :http_request_for, :get, url } before do gitlab_net.send(:config).http_settings.stub(:[]).with('user') { user } gitlab_net.send(:config).http_settings.stub(:[]).with('password') { password } get.should_receive(:basic_auth).with(user, password).once + get.should_receive(:set_form_data).with(hash_including(secret_token: 'a123')).once end it { should_not be_nil } |
