Skip to content

Commit

Permalink
Fix undef header method failures
Browse files Browse the repository at this point in the history
```
  NoMethodError: undefined method `header' for #<Rack::MockResponse:0x00005611e9cbc950>
  Did you mean?  headers
```

`#header` was dropped in the Rack 3.1 release (https://github.com/rack/rack/blob/main/CHANGELOG.md#removed-1), while the `#location` helper has been around since 2.x (rack/rack@5e0b0a3)
  • Loading branch information
codealchemy authored and PatrickTulskie committed Dec 29, 2024
1 parent 0bf8a98 commit f43e09a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/resque-web_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ module Test
test 'redirects to overview' do
post '/delayed/cancel_now'
assert last_response.status == 302
assert last_response.header['Location'].include? '/delayed'
assert last_response.location.include? '/delayed'
end
end

Expand All @@ -316,7 +316,7 @@ module Test

test 'redirects to delayed' do
assert last_response.status == 302
assert last_response.header['Location'].include? '/delayed'
assert last_response.location.include? '/delayed'
end
end

Expand Down

0 comments on commit f43e09a

Please sign in to comment.