summaryrefslogtreecommitdiff
path: root/spec/requests/api/group_import_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/group_import_spec.rb')
-rw-r--r--spec/requests/api/group_import_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/requests/api/group_import_spec.rb b/spec/requests/api/group_import_spec.rb
index 1594881677f..3f85428aac2 100644
--- a/spec/requests/api/group_import_spec.rb
+++ b/spec/requests/api/group_import_spec.rb
@@ -42,7 +42,7 @@ describe API::GroupImport do
it 'creates new group and accepts request' do
subject
- expect(response).to have_gitlab_http_status(202)
+ expect(response).to have_gitlab_http_status(:accepted)
end
it 'creates private group' do
@@ -63,7 +63,7 @@ describe API::GroupImport do
subject
- expect(response).to have_gitlab_http_status(202)
+ expect(response).to have_gitlab_http_status(:accepted)
expect(group.children.count).to eq(1)
end
@@ -81,7 +81,7 @@ describe API::GroupImport do
subject
- expect(response).to have_gitlab_http_status(202)
+ expect(response).to have_gitlab_http_status(:accepted)
expect(public_parent_group.children.first.visibility_level).to eq(Gitlab::VisibilityLevel::PUBLIC)
end
@@ -90,7 +90,7 @@ describe API::GroupImport do
subject
- expect(response).to have_gitlab_http_status(202)
+ expect(response).to have_gitlab_http_status(:accepted)
expect(internal_parent_group.children.first.visibility_level).to eq(Gitlab::VisibilityLevel::INTERNAL)
end
end
@@ -101,7 +101,7 @@ describe API::GroupImport do
expect { subject }.not_to change { Group.count }
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(json_response['message']).to eq('404 Group Not Found')
end
@@ -111,7 +111,7 @@ describe API::GroupImport do
subject
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
expect(json_response['message']).to eq('403 Forbidden')
end
end
@@ -128,7 +128,7 @@ describe API::GroupImport do
it 'returns 400 HTTP status' do
subject
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
end
end
end
@@ -139,7 +139,7 @@ describe API::GroupImport do
it 'forbids the request' do
subject
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
end
@@ -154,7 +154,7 @@ describe API::GroupImport do
post api('/groups/import', user), params: params, headers: workhorse_header
end.not_to change { Group.count }.from(1)
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response['error']).to eq(error_message)
end
end