|
28 | 28 |
|
29 | 29 | it 'returns a 200 status' do |
30 | 30 | expect(response.length).to eql(3) |
31 | | - expect(response.first).to eql('200') |
| 31 | + expect(response.first).to eql(200) |
32 | 32 | end |
33 | 33 |
|
34 | 34 | it 'returns contents of the openapi file' do |
|
44 | 44 |
|
45 | 45 | it 'returns a 200 status' do |
46 | 46 | expect(response.length).to eql(3) |
47 | | - expect(response.first).to eql('200') |
| 47 | + expect(response.first).to eql(200) |
48 | 48 | end |
49 | 49 | end |
50 | 50 | end |
|
59 | 59 |
|
60 | 60 | it 'returns a 200 status' do |
61 | 61 | expect(response.length).to eql(3) |
62 | | - expect(response.first).to eql('200') |
| 62 | + expect(response.first).to eql(200) |
63 | 63 | end |
64 | 64 |
|
65 | 65 | it 'applies the headers to the response' do |
|
74 | 74 |
|
75 | 75 | it 'returns a 200 status' do |
76 | 76 | expect(response.length).to eql(3) |
77 | | - expect(response.first).to eql('200') |
| 77 | + expect(response.first).to eql(200) |
78 | 78 | end |
79 | 79 |
|
80 | 80 | it 'applies the headers to the response' do |
|
91 | 91 | let(:env) { env_defaults.merge('PATH_INFO' => 'foobar.json') } |
92 | 92 |
|
93 | 93 | before do |
94 | | - allow(app).to receive(:call).and_return(['500', {}, []]) |
| 94 | + allow(app).to receive(:call).and_return([500, {}, []]) |
95 | 95 | end |
96 | 96 |
|
97 | 97 | it 'delegates to the next middleware' do |
98 | | - expect(response).to include('500') |
| 98 | + expect(response).to include(500) |
99 | 99 | end |
100 | 100 | end |
101 | 101 |
|
102 | 102 | context 'Disallow path traversing on path info' do |
103 | 103 | let(:env) { env_defaults.merge('PATH_INFO' => '../traverse-secret.yml') } |
104 | 104 |
|
105 | 105 | before do |
106 | | - allow(app).to receive(:call).and_return(['500', {}, []]) |
| 106 | + allow(app).to receive(:call).and_return([500, {}, []]) |
107 | 107 | end |
108 | 108 |
|
109 | 109 | it 'delegates to the next middleware' do |
110 | | - expect(response).to include('500') |
| 110 | + expect(response).to include(500) |
111 | 111 | end |
112 | 112 | end |
113 | 113 |
|
|
163 | 163 |
|
164 | 164 | it 'returns a 200 status' do |
165 | 165 | expect(response.length).to eql(3) |
166 | | - expect(response.first).to eql('200') |
| 166 | + expect(response.first).to eql(200) |
167 | 167 | end |
168 | 168 |
|
169 | 169 | it 'returns contents of the openapi file' do |
|
0 commit comments