From 568835c9bfa9ee3ff46415e4aba6c8f417977586 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 28 Jan 2019 14:53:50 -0600 Subject: [PATCH] Fix a numb of invalid routes in Rails 4 --- config/routes.rb | 6 +++--- spec/controllers/nonprofits/activities_spec.rb | 2 +- spec/controllers/nonprofits/custom_fields_joins_spec.rb | 6 +++--- spec/controllers/nonprofits/tag_joins_spec.rb | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index ca533d11..b9265366 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -90,9 +90,9 @@ Rails.application.routes.draw do put :bulk_delete, on: :collection post :merge, on: :collection get :merge_data, on: :collection - get :info_card - get :email_address - get :full_contact + get :info_card, on: :member + get :email_address, on: :member + get :full_contact, on: :member get :index_metrics, on: :collection end diff --git a/spec/controllers/nonprofits/activities_spec.rb b/spec/controllers/nonprofits/activities_spec.rb index 34800fcd..ec3dd383 100644 --- a/spec/controllers/nonprofits/activities_spec.rb +++ b/spec/controllers/nonprofits/activities_spec.rb @@ -7,7 +7,7 @@ describe Nonprofits::ActivitiesController, :type => :controller do include_context :shared_user_context describe 'rejects unauthorized users' do describe 'get' do - include_context :open_to_np_associate, :get, :index, id: :__our_np + include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np, supporter_id: 1111 end end end diff --git a/spec/controllers/nonprofits/custom_fields_joins_spec.rb b/spec/controllers/nonprofits/custom_fields_joins_spec.rb index 5a8fd8c1..ab3a4e2d 100644 --- a/spec/controllers/nonprofits/custom_fields_joins_spec.rb +++ b/spec/controllers/nonprofits/custom_fields_joins_spec.rb @@ -5,8 +5,8 @@ require 'controllers/support/shared_user_context' describe Nonprofits::CustomFieldJoinsController, :type => :controller do include_context :shared_user_context describe 'rejects unauthenticated users' do - describe 'index ' do - include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np + describe 'index' do + include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np, supporter_id: 1 end describe 'modify' do @@ -14,7 +14,7 @@ describe Nonprofits::CustomFieldJoinsController, :type => :controller do end describe 'destroy' do - include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: "1" + include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: "1", supporter_id: 1 end end end \ No newline at end of file diff --git a/spec/controllers/nonprofits/tag_joins_spec.rb b/spec/controllers/nonprofits/tag_joins_spec.rb index 1f996909..a9ff6327 100644 --- a/spec/controllers/nonprofits/tag_joins_spec.rb +++ b/spec/controllers/nonprofits/tag_joins_spec.rb @@ -6,7 +6,7 @@ describe Nonprofits::TagJoinsController, :type => :controller do describe 'authorization' do include_context :shared_user_context describe 'index' do - include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np + include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np, supporter_id: 1 end describe 'modify' do @@ -14,7 +14,7 @@ describe Nonprofits::TagJoinsController, :type => :controller do end describe 'destroy' do - include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1' + include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1', supporter_id: 2 end