summaryrefslogtreecommitdiff
path: root/spec/services/service_response_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 12:06:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 12:06:26 +0000
commitd2798d607e11e0ebae83ae909404834388733428 (patch)
tree096b7f4d4bdb315d28cdcd4d6db4e80911112e9c /spec/services/service_response_spec.rb
parentd8211a0ed119eada7d292e974a8fc7b0cd982d3c (diff)
downloadgitlab-ce-d2798d607e11e0ebae83ae909404834388733428.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/service_response_spec.rb')
-rw-r--r--spec/services/service_response_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/service_response_spec.rb b/spec/services/service_response_spec.rb
index e790d272e61..a6567f52c6f 100644
--- a/spec/services/service_response_spec.rb
+++ b/spec/services/service_response_spec.rb
@@ -23,6 +23,20 @@ describe ServiceResponse do
expect(response).to be_success
expect(response.payload).to eq(good: 'orange')
end
+
+ it 'creates a successful response with default HTTP status' do
+ response = described_class.success
+
+ expect(response).to be_success
+ expect(response.http_status).to eq(:ok)
+ end
+
+ it 'creates a successful response with custom HTTP status' do
+ response = described_class.success(http_status: 204)
+
+ expect(response).to be_success
+ expect(response.http_status).to eq(204)
+ end
end
describe '.error' do