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:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-12-19 22:50:20 +0300
committerJasper Maes <jaspermaes.jm@gmail.com>2018-12-21 12:10:26 +0300
commitbf7352007920318ea361674a02fbff6823bbe5a8 (patch)
treec4c64947bb66cfbe2f15d59946b4bf2695e6418f /spec/requests/api
parentf1464680c15c96d3dcc6f61aa3a8d77b72f4d098 (diff)
convert specs in javascripts/ and support/ to new syntax
Diffstat (limited to 'spec/requests/api')
-rw-r--r--spec/requests/api/events_spec.rb4
-rw-r--r--spec/requests/api/files_spec.rb12
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb
index 8c58ba45ce9..0ac23505de7 100644
--- a/spec/requests/api/events_spec.rb
+++ b/spec/requests/api/events_spec.rb
@@ -226,7 +226,7 @@ describe API::Events do
end
it 'correctly returns the second page without inaccessible events' do
- get api("/projects/#{public_project.id}/events", user), per_page: 2, page: 2
+ get api("/projects/#{public_project.id}/events", user), params: { per_page: 2, page: 2 }
titles = json_response.map { |event| event['target_title'] }
@@ -235,7 +235,7 @@ describe API::Events do
end
it 'correctly returns the first page without inaccessible events' do
- get api("/projects/#{public_project.id}/events", user), per_page: 2, page: 1
+ get api("/projects/#{public_project.id}/events", user), params: { per_page: 2, page: 1 }
titles = json_response.map { |event| event['target_title'] }
diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb
index e6d82448c0d..0ba1f2d7a2b 100644
--- a/spec/requests/api/files_spec.rb
+++ b/spec/requests/api/files_spec.rb
@@ -54,7 +54,7 @@ describe API::Files do
describe "HEAD /projects/:id/repository/files/:file_path" do
shared_examples_for 'repository files' do
it 'returns file attributes in headers' do
- head api(route(file_path), current_user), params
+ head api(route(file_path), current_user), params: params
expect(response).to have_gitlab_http_status(200)
expect(response.headers['X-Gitlab-File-Path']).to eq(CGI.unescape(file_path))
@@ -68,7 +68,7 @@ describe API::Files do
file_path = "files%2Fjs%2Fcommit%2Ejs%2Ecoffee"
params[:ref] = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9"
- head api(route(file_path), current_user), params
+ head api(route(file_path), current_user), params: params
expect(response).to have_gitlab_http_status(200)
expect(response.headers['X-Gitlab-File-Name']).to eq('commit.js.coffee')
@@ -87,7 +87,7 @@ describe API::Files do
it "responds with a 404 status" do
params[:ref] = 'master'
- head api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params
+ head api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params: params
expect(response).to have_gitlab_http_status(404)
end
@@ -97,7 +97,7 @@ describe API::Files do
include_context 'disabled repository'
it "responds with a 403 status" do
- head api(route(file_path), current_user), params
+ head api(route(file_path), current_user), params: params
expect(response).to have_gitlab_http_status(403)
end
@@ -115,7 +115,7 @@ describe API::Files do
it "responds with a 404 status" do
current_user = nil
- head api(route(file_path), current_user), params
+ head api(route(file_path), current_user), params: params
expect(response).to have_gitlab_http_status(404)
end
@@ -136,7 +136,7 @@ describe API::Files do
context 'when authenticated', 'as a guest' do
it_behaves_like '403 response' do
- let(:request) { head api(route(file_path), guest), params }
+ let(:request) { head api(route(file_path), guest), params: params }
end
end
end