|
1 | 1 | # The following code inspired and modified from Rails' `assert_response`: |
2 | 2 | # |
3 | | -# https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/assertions/response.rb#L22-L38 |
| 3 | +# https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/assertions/response.rb#L22-L38 |
4 | 4 | # |
5 | 5 | # Thank you to all the Rails devs who did the heavy lifting on this! |
6 | 6 |
|
@@ -243,7 +243,7 @@ class GenericStatus < RSpec::Rails::Matchers::BaseMatcher |
243 | 243 |
|
244 | 244 | # @return [Array<Symbol>] of status codes which represent a HTTP status |
245 | 245 | # code "group" |
246 | | - # @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
| 246 | + # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
247 | 247 | def self.valid_statuses |
248 | 248 | [ |
249 | 249 | :error, :success, :missing, |
@@ -313,7 +313,7 @@ def type_message |
313 | 313 |
|
314 | 314 | # @return [String] formatting the associated code(s) for the various |
315 | 315 | # status code "groups" |
316 | | - # @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
| 316 | + # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
317 | 317 | # @see https://github.com/rack/rack/blob/master/lib/rack/response.rb `Rack::Response` |
318 | 318 | def type_codes |
319 | 319 | # At the time of this commit the most recent version of |
@@ -373,7 +373,7 @@ def type_codes |
373 | 373 | # expect(response).to have_http_status(404) |
374 | 374 | # expect(page).to have_http_status(:created) |
375 | 375 | # |
376 | | - # @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
| 376 | + # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` |
377 | 377 | # @see https://github.com/rack/rack/blob/master/lib/rack/utils.rb `Rack::Utils::SYMBOL_TO_STATUS_CODE` |
378 | 378 | def have_http_status(target) |
379 | 379 | raise ArgumentError, "Invalid HTTP status: nil" unless target |
|
0 commit comments