Skip to content

Commit ca49961

Browse files
committed
Add integration specs
1 parent 7beec80 commit ca49961

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/grape/api_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,22 @@ def static
20312031
expect(route.route_settings[:custom]).to eq(key: 'value')
20322032
end
20332033
end
2034+
describe 'status' do
2035+
it 'can be set to arbitrary Fixnum value' do
2036+
subject.get '/foo' do
2037+
status 210
2038+
end
2039+
get '/foo'
2040+
expect(last_response.status).to eq 210
2041+
end
2042+
it 'can be set with a status code symbol' do
2043+
subject.get '/foo' do
2044+
status :see_other
2045+
end
2046+
get '/foo'
2047+
expect(last_response.status).to eq 303
2048+
end
2049+
end
20342050
end
20352051

20362052
context 'desc' do

0 commit comments

Comments
 (0)