This project is archived and is in readonly mode.
Error on assert_recognizes when used on a route with constraint
-
archfear
I can verify this is happening for me on 3.0.0.beta4 as well.
+1
-
Andrew White
- Milestone cleared.
- State changed from new to open
- Assigned user set to Andrew White
- Importance changed from to Low
The problem stems from the fact that subdomain is defined in ActionDispatch::Request and the test session uses Rack::Request. Unfortunately it's not as simple as switching the class in ActionDispatch::IntegrationTest because it delegates the session creation to Rack::Test and there doesn't seem to be a way to override the request class from outside Rack::Test.
-
Andrew White
- Importance changed from Low to High
The attached patch adds support for passing full urls into assert_recognizes so that constraints like subdomain, etc. can be tested in functional tests as well as integration tests.
-
Repository
- State changed from open to resolved
(from [7c9bf45b0dd7ad7a1d99a14566bfaeadc77b4665]) Support routing constraints in functional tests
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.[#5005 Error on assert_recognizes when used on a route with constraint state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/7c9bf45b0dd7ad7a1d99a14566bfae... -
Repository
(from [47f6d8b880ae5532a9a79303edd51d43dcb3bf07]) Support routing constraints in functional tests
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.[#5005 Error on assert_recognizes when used on a route with constraint state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/47f6d8b880ae5532a9a79303edd51d...
