Skip to content
Snippets Groups Projects
Commit 2f40dac3 authored by Jacopo's avatar Jacopo
Browse files

Refactor `have_http_status` into `have_gitlab_http_status` in the specs

parent b4dc0ba2
No related branches found
No related tags found
No related merge requests found
Showing
with 105 additions and 100 deletions
---
title: Refactor have_http_status into have_gitlab_http_status
merge_request: 14958
author: Jacopo Beschi @jacopo-beschi
type: added
Loading
Loading
@@ -20,7 +20,7 @@
 
post :create, hook: hook_params
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(SystemHook.all.size).to eq(1)
expect(SystemHook.first).to have_attributes(hook_params)
end
Loading
Loading
Loading
Loading
@@ -22,7 +22,7 @@
it "responds with status 404" do
delete :destroy
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it "doesn't sign us in" do
Loading
Loading
@@ -46,7 +46,7 @@
it "responds with status 404" do
delete :destroy
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it "doesn't sign us in as the impersonator" do
Loading
Loading
@@ -65,7 +65,7 @@
it "responds with status 404" do
delete :destroy
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it "doesn't sign us in as the impersonator" do
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@
 
get :index
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.body).not_to match(pending_delete_project.name)
expect(response.body).to match(project.name)
end
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@
it 'lists all runners' do
get :index
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
 
Loading
Loading
@@ -19,13 +19,13 @@
it 'shows a particular runner' do
get :show, id: runner.id
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'shows 404 for unknown runner' do
get :show, id: 0
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -39,7 +39,7 @@
 
runner.reload
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(runner.description).to eq(new_desc)
end
end
Loading
Loading
@@ -48,7 +48,7 @@
it 'destroys the runner' do
delete :destroy, id: runner.id
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(Ci::Runner.find_by(id: runner.id)).to be_nil
end
end
Loading
Loading
@@ -63,7 +63,7 @@
 
runner.reload
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(runner.active).to eq(true)
end
end
Loading
Loading
@@ -78,7 +78,7 @@
 
runner.reload
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(runner.active).to eq(false)
end
end
Loading
Loading
Loading
Loading
@@ -20,7 +20,7 @@
it 'successfully displays the template' do
get :edit, id: service.id
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
end
Loading
Loading
@@ -46,7 +46,7 @@
 
put :update, id: service.id, service: { active: true }
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
end
 
it 'does not call the propagation worker when service is not active' do
Loading
Loading
@@ -54,7 +54,7 @@
 
put :update, id: service.id, service: { properties: {} }
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
end
end
end
Loading
Loading
@@ -14,7 +14,7 @@
it 'lists all spam logs' do
get :index
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
 
Loading
Loading
@@ -22,14 +22,14 @@
it 'removes only the spam log when removing log' do
expect { delete :destroy, id: first_spam.id }.to change { SpamLog.count }.by(-1)
expect(User.find(user.id)).to be_truthy
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'removes user and his spam logs when removing the user' do
delete :destroy, id: first_spam.id, remove_user: true
 
expect(flash[:notice]).to eq "User #{user.username} was successfully removed."
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(SpamLog.count).to eq(0)
expect { User.find(user.id) }.to raise_error(ActiveRecord::RecordNotFound)
end
Loading
Loading
@@ -42,7 +42,7 @@
it 'submits the log as ham' do
post :mark_as_ham, id: first_spam.id
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(SpamLog.find(first_spam.id).submitted_as_ham).to be_truthy
end
end
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@
it 'deletes user and ghosts their contributions' do
delete :destroy, id: user.username, format: :json
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(User.exists?(user.id)).to be_falsy
expect(issue.reload.author).to be_ghost
end
Loading
Loading
@@ -27,7 +27,7 @@
it 'deletes the user and their contributions when hard delete is specified' do
delete :destroy, id: user.username, hard_delete: true, format: :json
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(User.exists?(user.id)).to be_falsy
expect(Issue.exists?(issue.id)).to be_falsy
end
Loading
Loading
Loading
Loading
@@ -61,7 +61,7 @@ def index
context "when the 'private_token' param is populated with the private token" do
it "logs the user in" do
get :index, private_token: user.private_token
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.body).to eq("authenticated")
end
end
Loading
Loading
@@ -70,7 +70,7 @@ def index
it "logs the user in" do
@request.headers['PRIVATE-TOKEN'] = user.private_token
get :index
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.body).to eq("authenticated")
end
end
Loading
Loading
@@ -95,7 +95,7 @@ def index
context "when the 'personal_access_token' param is populated with the personal access token" do
it "logs the user in" do
get :index, private_token: personal_access_token.token
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.body).to eq('authenticated')
end
end
Loading
Loading
@@ -104,7 +104,7 @@ def index
it "logs the user in" do
@request.headers["PRIVATE-TOKEN"] = personal_access_token.token
get :index
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.body).to eq('authenticated')
end
end
Loading
Loading
@@ -158,7 +158,7 @@ def index
it 'returns 200 response' do
get :index, private_token: user.private_token, format: requested_format
 
expect(response).to have_http_status 200
expect(response).to have_gitlab_http_status 200
end
end
 
Loading
Loading
@@ -166,7 +166,7 @@ def index
it 'returns 404 response' do
get :index, private_token: user.private_token
 
expect(response).to have_http_status 404
expect(response).to have_gitlab_http_status 404
end
end
end
Loading
Loading
@@ -183,7 +183,7 @@ def index
context 'when the request format is atom' do
it "logs the user in" do
get :index, rss_token: user.rss_token, format: :atom
expect(response).to have_http_status 200
expect(response).to have_gitlab_http_status 200
expect(response.body).to eq 'authenticated'
end
end
Loading
Loading
@@ -191,7 +191,7 @@ def index
context 'when the request format is not atom' do
it "doesn't log the user in" do
get :index, rss_token: user.rss_token
expect(response.status).not_to have_http_status 200
expect(response.status).not_to have_gitlab_http_status 200
expect(response.body).not_to eq 'authenticated'
end
end
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@
get(:users, project_id: 'unknown')
end
 
it { expect(response).to have_http_status(404) }
it { expect(response).to have_gitlab_http_status(404) }
end
end
 
Loading
Loading
@@ -59,7 +59,7 @@
get(:users, group_id: 'unknown')
end
 
it { expect(response).to have_http_status(404) }
it { expect(response).to have_gitlab_http_status(404) }
end
end
 
Loading
Loading
@@ -138,7 +138,7 @@
get(:users, project_id: project.id)
end
 
it { expect(response).to have_http_status(404) }
it { expect(response).to have_gitlab_http_status(404) }
end
 
describe 'GET #users with unknown project' do
Loading
Loading
@@ -146,7 +146,7 @@
get(:users, project_id: 'unknown')
end
 
it { expect(response).to have_http_status(404) }
it { expect(response).to have_gitlab_http_status(404) }
end
 
describe 'GET #users with inaccessible group' do
Loading
Loading
@@ -155,7 +155,7 @@
get(:users, group_id: user.namespace.id)
end
 
it { expect(response).to have_http_status(404) }
it { expect(response).to have_gitlab_http_status(404) }
end
 
describe 'GET #users with no project' do
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@
it 'returns a not found 404 response' do
list_issues user: user, board: 999, list: list2
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -62,7 +62,7 @@
it 'returns a not found 404 response' do
list_issues user: user, board: board, list: 999
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
@@ -93,7 +93,7 @@
it 'returns a forbidden 403 response' do
list_issues user: user, board: board, list: list2
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -116,7 +116,7 @@ def list_issues(user:, board:, list: nil)
it 'returns a successful 200 response' do
create_issue user: user, board: board, list: list1, title: 'New issue'
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'returns the created issue' do
Loading
Loading
@@ -131,7 +131,7 @@ def list_issues(user:, board:, list: nil)
it 'returns an unprocessable entity 422 response' do
create_issue user: user, board: board, list: list1, title: nil
 
expect(response).to have_http_status(422)
expect(response).to have_gitlab_http_status(422)
end
end
 
Loading
Loading
@@ -141,7 +141,7 @@ def list_issues(user:, board:, list: nil)
 
create_issue user: user, board: board, list: list, title: 'New issue'
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -149,7 +149,7 @@ def list_issues(user:, board:, list: nil)
it 'returns a not found 404 response' do
create_issue user: user, board: 999, list: list1, title: 'New issue'
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -157,7 +157,7 @@ def list_issues(user:, board:, list: nil)
it 'returns a not found 404 response' do
create_issue user: user, board: board, list: 999, title: 'New issue'
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
@@ -166,7 +166,7 @@ def list_issues(user:, board:, list: nil)
it 'returns a forbidden 403 response' do
create_issue user: guest, board: board, list: list1, title: 'New issue'
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -187,7 +187,7 @@ def create_issue(user:, board:, list:, title:)
it 'returns a successful 200 response' do
move user: user, board: board, issue: issue, from_list_id: list1.id, to_list_id: list2.id
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'moves issue to the desired list' do
Loading
Loading
@@ -201,19 +201,19 @@ def create_issue(user:, board:, list:, title:)
it 'returns a unprocessable entity 422 response for invalid lists' do
move user: user, board: board, issue: issue, from_list_id: nil, to_list_id: nil
 
expect(response).to have_http_status(422)
expect(response).to have_gitlab_http_status(422)
end
 
it 'returns a not found 404 response for invalid board id' do
move user: user, board: 999, issue: issue, from_list_id: list1.id, to_list_id: list2.id
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it 'returns a not found 404 response for invalid issue id' do
move user: user, board: board, issue: double(id: 999), from_list_id: list1.id, to_list_id: list2.id
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -227,7 +227,7 @@ def create_issue(user:, board:, list:, title:)
it 'returns a forbidden 403 response' do
move user: guest, board: board, issue: issue, from_list_id: list1.id, to_list_id: list2.id
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@
it 'returns a successful 200 response' do
read_board_list user: user, board: board
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.content_type).to eq 'application/json'
end
 
Loading
Loading
@@ -39,7 +39,7 @@
it 'returns a forbidden 403 response' do
read_board_list user: user, board: board
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -60,7 +60,7 @@ def read_board_list(user:, board:)
it 'returns a successful 200 response' do
create_board_list user: user, board: board, label_id: label.id
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'returns the created list' do
Loading
Loading
@@ -75,7 +75,7 @@ def read_board_list(user:, board:)
it 'returns a not found 404 response' do
create_board_list user: user, board: board, label_id: nil
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -85,7 +85,7 @@ def read_board_list(user:, board:)
 
create_board_list user: user, board: board, label_id: label.id
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
@@ -96,7 +96,7 @@ def read_board_list(user:, board:)
 
create_board_list user: guest, board: board, label_id: label.id
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -119,7 +119,7 @@ def create_board_list(user:, board:, label_id:)
it 'returns a successful 200 response' do
move user: user, board: board, list: planning, position: 1
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'moves the list to the desired position' do
Loading
Loading
@@ -133,7 +133,7 @@ def create_board_list(user:, board:, label_id:)
it 'returns an unprocessable entity 422 response' do
move user: user, board: board, list: planning, position: 6
 
expect(response).to have_http_status(422)
expect(response).to have_gitlab_http_status(422)
end
end
 
Loading
Loading
@@ -141,7 +141,7 @@ def create_board_list(user:, board:, label_id:)
it 'returns a not found 404 response' do
move user: user, board: board, list: 999, position: 1
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -149,7 +149,7 @@ def create_board_list(user:, board:, label_id:)
it 'returns a forbidden 403 response' do
move user: guest, board: board, list: planning, position: 6
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -172,7 +172,7 @@ def move(user:, board:, list:, position:)
it 'returns a successful 200 response' do
remove_board_list user: user, board: board, list: planning
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'removes list from board' do
Loading
Loading
@@ -184,7 +184,7 @@ def move(user:, board:, list:, position:)
it 'returns a not found 404 response' do
remove_board_list user: user, board: board, list: 999
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -192,7 +192,7 @@ def move(user:, board:, list:, position:)
it 'returns a forbidden 403 response' do
remove_board_list user: guest, board: board, list: planning
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -212,7 +212,7 @@ def remove_board_list(user:, board:, list:)
it 'returns a successful 200 response' do
generate_default_lists user: user, board: board
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'returns the defaults lists' do
Loading
Loading
@@ -228,7 +228,7 @@ def remove_board_list(user:, board:, list:)
 
generate_default_lists user: user, board: board
 
expect(response).to have_http_status(422)
expect(response).to have_gitlab_http_status(422)
end
end
 
Loading
Loading
@@ -236,7 +236,7 @@ def remove_board_list(user:, board:, list:)
it 'returns a forbidden 403 response' do
generate_default_lists user: guest, board: board
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
Loading
Loading
@@ -32,7 +32,7 @@ def view_milestone
it 'shows milestone page' do
view_milestone
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
end
Loading
Loading
@@ -18,19 +18,19 @@
 
get :index, project_id: unauthorized_project.id
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it 'renders 404 when given project does not exists' do
get :index, project_id: 999
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
 
it 'renders 200 when filtering for "any project" todos' do
get :index, project_id: ''
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'renders 200 when user has access on given project' do
Loading
Loading
@@ -38,7 +38,7 @@
 
get :index, project_id: authorized_project.id
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
 
Loading
Loading
@@ -61,7 +61,7 @@
get :index, page: last_page
 
expect(assigns(:todos).current_page).to eq(last_page)
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
it 'does not redirect to external sites when provided a host field' do
Loading
Loading
@@ -104,7 +104,7 @@
patch :restore, id: todo.id
 
expect(todo.reload).to be_pending
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(json_response).to eq({ "count" => "1", "done_count" => "0" })
end
end
Loading
Loading
@@ -118,7 +118,7 @@
todos.each do |todo|
expect(todo.reload).to be_pending
end
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(json_response).to eq({ 'count' => '2', 'done_count' => '0' })
end
end
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@
it 'renders index with 200 status code' do
get :index, group_id: group
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response).to render_template(:index)
end
end
Loading
Loading
@@ -30,7 +30,7 @@
user_ids: group_user.id,
access_level: Gitlab::Access::GUEST
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
expect(group.users).not_to include group_user
end
end
Loading
Loading
@@ -73,7 +73,7 @@
it 'returns 403' do
delete :destroy, group_id: group, id: 42
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -86,7 +86,7 @@
it 'returns 403' do
delete :destroy, group_id: group, id: member
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
expect(group.members).to include member
end
end
Loading
Loading
@@ -123,7 +123,7 @@
it 'returns 404' do
delete :leave, group_id: group
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
 
Loading
Loading
@@ -144,7 +144,7 @@
it 'supports json request' do
delete :leave, group_id: group, format: :json
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(json_response['notice']).to eq "You left the \"#{group.name}\" group."
end
end
Loading
Loading
@@ -157,7 +157,7 @@
it 'cannot removes himself from the group' do
delete :leave, group_id: group
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -204,7 +204,7 @@
it 'returns 403' do
post :approve_access_request, group_id: group, id: 42
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
end
end
 
Loading
Loading
@@ -217,7 +217,7 @@
it 'returns 403' do
post :approve_access_request, group_id: group, id: member
 
expect(response).to have_http_status(403)
expect(response).to have_gitlab_http_status(403)
expect(group.members).not_to include member
end
end
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@
 
post :toggle_subscription, group_id: group.to_param, id: label.to_param
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
end
end
Loading
Loading
@@ -35,7 +35,7 @@
it 'shows group milestones page' do
get :index, group_id: group.to_param
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
end
 
context 'as JSON' do
Loading
Loading
@@ -51,7 +51,7 @@
expect(milestones.count).to eq(2)
expect(milestones.first["title"]).to eq("group milestone")
expect(milestones.second["title"]).to eq("legacy")
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response.content_type).to eq 'application/json'
end
end
Loading
Loading
@@ -153,7 +153,7 @@
it 'does not redirect' do
get :index, group_id: group.to_param
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -172,7 +172,7 @@
it 'does not redirect' do
get :show, group_id: group.to_param, id: title
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -242,7 +242,7 @@
group_id: group.to_param,
milestone: { title: title }
 
expect(response).not_to have_http_status(404)
expect(response).not_to have_gitlab_http_status(404)
end
 
it 'does not redirect to the correct casing' do
Loading
Loading
@@ -250,7 +250,7 @@
group_id: group.to_param,
milestone: { title: title }
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -262,7 +262,7 @@
group_id: redirect_route.path,
milestone: { title: title }
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@
it 'renders show with 200 status code' do
get :show, group_id: group
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response).to render_template(:show)
end
end
Loading
Loading
Loading
Loading
@@ -48,7 +48,7 @@
post :update, group_id: group,
id: variable.id, variable: { key: '?', value: variable.value }
 
expect(response).to have_http_status(200)
expect(response).to have_gitlab_http_status(200)
expect(response).to render_template :show
end
end
Loading
Loading
Loading
Loading
@@ -238,7 +238,7 @@
it 'updates the path successfully' do
post :update, id: group.to_param, group: { path: 'new_path' }
 
expect(response).to have_http_status(302)
expect(response).to have_gitlab_http_status(302)
expect(controller).to set_flash[:notice]
end
 
Loading
Loading
@@ -309,7 +309,7 @@
it 'does not redirect' do
get :issues, id: group.to_param
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -328,7 +328,7 @@
it 'does not redirect' do
get :show, id: group.to_param
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -395,13 +395,13 @@
it 'does not 404' do
post :update, id: group.to_param.upcase, group: { path: 'new_path' }
 
expect(response).not_to have_http_status(404)
expect(response).not_to have_gitlab_http_status(404)
end
 
it 'does not redirect to the correct casing' do
post :update, id: group.to_param.upcase, group: { path: 'new_path' }
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -411,7 +411,7 @@
it 'returns not found' do
post :update, id: redirect_route.path, group: { path: 'new_path' }
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
@@ -421,13 +421,13 @@
it 'does not 404' do
delete :destroy, id: group.to_param.upcase
 
expect(response).not_to have_http_status(404)
expect(response).not_to have_gitlab_http_status(404)
end
 
it 'does not redirect to the correct casing' do
delete :destroy, id: group.to_param.upcase
 
expect(response).not_to have_http_status(301)
expect(response).not_to have_gitlab_http_status(301)
end
end
 
Loading
Loading
@@ -437,7 +437,7 @@
it 'returns not found' do
delete :destroy, id: redirect_route.path
 
expect(response).to have_http_status(404)
expect(response).to have_gitlab_http_status(404)
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment