test/integration/routes/routes_test.rb in jsonapi-resources-0.0.15 vs test/integration/routes/routes_test.rb in jsonapi-resources-0.0.16
- old
+ new
@@ -82,13 +82,13 @@
def test_routing_v1_posts_delete
assert_routing({path: '/api/v1/posts/1', method: :delete},
{action: 'destroy', controller: 'api/v1/posts', id: '1'})
end
- def test_routing_v1_posts_links_author_show
- assert_routing({path: '/api/v1/posts/1/links/author', method: :get},
- {controller: 'api/v1/posts', action: 'show_association', post_id: '1', association: 'author'})
+ def test_routing_v1_posts_links_writer_show
+ assert_routing({path: '/api/v1/posts/1/links/writer', method: :get},
+ {controller: 'api/v1/posts', action: 'show_association', post_id: '1', association: 'writer'})
end
# V2
def test_routing_v2_posts_show
assert_routing({path: '/api/v2/authors/1', method: :get},
@@ -146,11 +146,11 @@
{action: 'show', controller: 'api/v5/expense_entries', id: '1'})
assert_routing({path: '/api/v5/expense-entries/1/links/iso-currency', method: :get},
{controller: 'api/v5/expense_entries', action: 'show_association', expense_entry_id: '1', association: 'iso_currency'})
end
-
+
#primary_key
def test_routing_primary_key_jsonapi_resources
assert_routing({path: '/iso_currencies/USD', method: :get},
{action: 'show', controller: 'iso_currencies', code: 'USD'})
end
@@ -171,6 +171,6 @@
# { controller: 'api/v3/posts', action: 'destroy_association', post_id: '1', keys: '1,2', association: 'tags' })
# end
# Test that non acts as set has_many association update route is not created
-end
\ No newline at end of file
+end