Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-09-14 14:37:18 +0300
committerValery Sizov <vsv2711@gmail.com>2015-09-14 14:37:18 +0300
commit4c53cc0ebac36560d806732ff1fefba9206c75f3 (patch)
treeb617210202a10c2913075f5c21fd3b583fdfea2c /spec/support/stub_gitlab_calls.rb
parent95037c9c559dae1d4482a2003ca2f0f778678d09 (diff)
rubocop satisfy
Diffstat (limited to 'spec/support/stub_gitlab_calls.rb')
-rw-r--r--spec/support/stub_gitlab_calls.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb
index fadc3df412b..41e4c3e275b 100644
--- a/spec/support/stub_gitlab_calls.rb
+++ b/spec/support/stub_gitlab_calls.rb
@@ -23,21 +23,21 @@ module StubGitlabCalls
f = File.read(Rails.root.join('spec/support/gitlab_stubs/session.json'))
stub_request(:post, "#{gitlab_url}api/v3/session.json").
- with(:body => "{\"email\":\"test@test.com\",\"password\":\"123456\"}",
- :headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 201, :body => f, :headers => {'Content-Type'=>'application/json'})
+ with(body: "{\"email\":\"test@test.com\",\"password\":\"123456\"}",
+ headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 201, body: f, headers: {'Content-Type'=>'application/json'})
end
def stub_user
f = File.read(Rails.root.join('spec/support/gitlab_stubs/user.json'))
stub_request(:get, "#{gitlab_url}api/v3/user?private_token=Wvjy2Krpb7y8xi93owUz").
- with(:headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'})
+ with(headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 200, body: f, headers: {'Content-Type'=>'application/json'})
stub_request(:get, "#{gitlab_url}api/v3/user?access_token=some_token").
- with(:headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'})
+ with(headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 200, body: f, headers: {'Content-Type'=>'application/json'})
end
def stub_project_8
@@ -54,24 +54,24 @@ module StubGitlabCalls
f = File.read(Rails.root.join('spec/support/gitlab_stubs/projects.json'))
stub_request(:get, "#{gitlab_url}api/v3/projects.json?archived=false&ci_enabled_first=true&private_token=Wvjy2Krpb7y8xi93owUz").
- with(:headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'})
+ with(headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 200, body: f, headers: {'Content-Type'=>'application/json'})
end
def stub_projects_owned
stub_request(:get, "#{gitlab_url}api/v3/projects/owned.json?archived=false&ci_enabled_first=true&private_token=Wvjy2Krpb7y8xi93owUz").
- with(:headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 200, :body => "", :headers => {})
+ with(headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 200, body: "", headers: {})
end
def stub_ci_enable
stub_request(:put, "#{gitlab_url}api/v3/projects/2/services/gitlab-ci.json?private_token=Wvjy2Krpb7y8xi93owUz").
- with(:headers => {'Content-Type'=>'application/json'}).
- to_return(:status => 200, :body => "", :headers => {})
+ with(headers: {'Content-Type'=>'application/json'}).
+ to_return(status: 200, body: "", headers: {})
end
def project_hash_array
f = File.read(Rails.root.join('spec/support/gitlab_stubs/projects.json'))
- return JSON.parse f
+ JSON.parse f
end
end