Skip to content

Commit

Permalink
Update routes.rb to fix embeddable features (#2818)
Browse files Browse the repository at this point in the history
* Update routes.rb

* Removed the apostrophe mismatch

* Added tests for embed in feature
  • Loading branch information
jywarren authored Jun 11, 2018
1 parent 8b65e69 commit 75c7553
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
get 'locations/form' => 'tag#location'
get 'locations/modal' => 'tag#location_modal'
get 'embed/grid/:tagname' => 'tag#gridsEmbed'
get 'features/embed/:id' => 'features#embed'

get 'rsvp/:id' => 'notes#rsvp'
get 'feed/liked' => 'notes#liked_rss'
Expand Down
7 changes: 7 additions & 0 deletions test/functional/features_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,11 @@ def teardown
assert_equal 'Edits saved and cache cleared.', flash[:notice]
assert_redirected_to '/features?_=' + Time.now.to_i.to_s
end

test 'should find the correct node in embed of feature' do
fixture_node = nodes(:blog)
get :embed, params: { id: fixture_node.title}
embed_node = assigns(:node)
assert_equal embed_node.nid, fixture_node.nid
end
end

0 comments on commit 75c7553

Please sign in to comment.