diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:44:11 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:44:11 +0200 |
commit | 411ccbdab2608c62aabdb320d52cb02d446bb39c (patch) | |
tree | 05671553ac2a23dd1db4d11949c1ac43c3dd1367 /actionpack/test/dispatch/routing_assertions_test.rb | |
parent | 60b67d76dc1d98e4269aac7705e9d8323eb42942 (diff) | |
download | rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.gz rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.bz2 rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.zip |
remove redundant curlies from hash arguments
Diffstat (limited to 'actionpack/test/dispatch/routing_assertions_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_assertions_test.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb index 1e77c7311e..1f8ce059d1 100644 --- a/actionpack/test/dispatch/routing_assertions_test.rb +++ b/actionpack/test/dispatch/routing_assertions_test.rb @@ -27,16 +27,16 @@ class RoutingAssertionsTest < ActionController::TestCase end def test_assert_generates - assert_generates("/articles", { controller: "articles", action: "index" }) - assert_generates("/articles/1", { controller: "articles", action: "show", id: "1" }) + assert_generates("/articles", controller: "articles", action: "index") + assert_generates("/articles/1", controller: "articles", action: "show", id: "1") end def test_assert_generates_with_defaults - assert_generates("/articles/1/edit", { controller: "articles", action: "edit" }, { id: "1" }) + assert_generates("/articles/1/edit", { controller: "articles", action: "edit" }, id: "1") end def test_assert_generates_with_extras - assert_generates("/articles", { controller: "articles", action: "index", page: "1" }, {}, { page: "1" }) + assert_generates("/articles", { controller: "articles", action: "index", page: "1" }, {}, page: "1") end def test_assert_recognizes @@ -45,12 +45,12 @@ class RoutingAssertionsTest < ActionController::TestCase end def test_assert_recognizes_with_extras - assert_recognizes({ controller: "articles", action: "index", page: "1" }, "/articles", { page: "1" }) + assert_recognizes({ controller: "articles", action: "index", page: "1" }, "/articles", page: "1") end def test_assert_recognizes_with_method - assert_recognizes({ controller: "articles", action: "create" }, { path: "/articles", method: :post }) - assert_recognizes({ controller: "articles", action: "update", id: "1" }, { path: "/articles/1", method: :put }) + assert_recognizes({ controller: "articles", action: "create" }, path: "/articles", method: :post) + assert_recognizes({ controller: "articles", action: "update", id: "1" }, path: "/articles/1", method: :put) end def test_assert_recognizes_with_hash_constraint @@ -69,9 +69,9 @@ class RoutingAssertionsTest < ActionController::TestCase def test_assert_recognizes_with_query_constraint assert_raise(Assertion) do - assert_recognizes({ controller: "query_articles", action: "index", use_query: "false" }, "/query/articles", { use_query: "false" }) + assert_recognizes({ controller: "query_articles", action: "index", use_query: "false" }, "/query/articles", use_query: "false") end - assert_recognizes({ controller: "query_articles", action: "index", use_query: "true" }, "/query/articles", { use_query: "true" }) + assert_recognizes({ controller: "query_articles", action: "index", use_query: "true" }, "/query/articles", use_query: "true") end def test_assert_recognizes_raises_message @@ -95,25 +95,25 @@ class RoutingAssertionsTest < ActionController::TestCase end def test_assert_routing_with_defaults - assert_routing("/articles/1/edit", { controller: "articles", action: "edit", id: "1" }, { id: "1" }) + assert_routing("/articles/1/edit", { controller: "articles", action: "edit", id: "1" }, id: "1") end def test_assert_routing_with_extras - assert_routing("/articles", { controller: "articles", action: "index", page: "1" }, { }, { page: "1" }) + assert_routing("/articles", { controller: "articles", action: "index", page: "1" }, { }, page: "1") end def test_assert_routing_with_hash_constraint assert_raise(Assertion) do - assert_routing("http://test.host/secure/articles", { controller: "secure_articles", action: "index" }) + assert_routing("http://test.host/secure/articles", controller: "secure_articles", action: "index") end - assert_routing("https://test.host/secure/articles", { controller: "secure_articles", action: "index", protocol: "https://" }) + assert_routing("https://test.host/secure/articles", controller: "secure_articles", action: "index", protocol: "https://") end def test_assert_routing_with_block_constraint assert_raise(Assertion) do - assert_routing("http://test.host/block/articles", { controller: "block_articles", action: "index" }) + assert_routing("http://test.host/block/articles", controller: "block_articles", action: "index") end - assert_routing("https://test.host/block/articles", { controller: "block_articles", action: "index" }) + assert_routing("https://test.host/block/articles", controller: "block_articles", action: "index") end def test_with_routing @@ -124,7 +124,7 @@ class RoutingAssertionsTest < ActionController::TestCase assert_routing("/artikel", controller: "articles", action: "index") assert_raise(Assertion) do - assert_routing("/articles", { controller: "articles", action: "index" }) + assert_routing("/articles", controller: "articles", action: "index") end end end |