diff --git a/config/routes.rb b/config/routes.rb index 0522ee3b67..978dca9594 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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' diff --git a/test/functional/features_controller_test.rb b/test/functional/features_controller_test.rb index f28e864fec..9172426ee9 100644 --- a/test/functional/features_controller_test.rb +++ b/test/functional/features_controller_test.rb @@ -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