diff --git a/app/controllers/nonprofits/recurring_donations_controller.rb b/app/controllers/nonprofits/recurring_donations_controller.rb index 2623484c..78fed2f4 100644 --- a/app/controllers/nonprofits/recurring_donations_controller.rb +++ b/app/controllers/nonprofits/recurring_donations_controller.rb @@ -56,7 +56,11 @@ module Nonprofits def show @recurring_donation = current_recurring_donation - respond_to { |format| format.json } + respond_to do |format| + format.json do + render locals: {recurring_donation: @recurring_donation} + end + end end def destroy diff --git a/app/views/nonprofits/recurring_donations/show.json.jbuilder b/app/views/nonprofits/recurring_donations/show.jbuilder similarity index 100% rename from app/views/nonprofits/recurring_donations/show.json.jbuilder rename to app/views/nonprofits/recurring_donations/show.jbuilder diff --git a/spec/controllers/nonprofits/recurring_donations_spec.rb b/spec/controllers/nonprofits/recurring_donations_spec.rb index f9300cd3..4a23e1c0 100644 --- a/spec/controllers/nonprofits/recurring_donations_spec.rb +++ b/spec/controllers/nonprofits/recurring_donations_spec.rb @@ -16,7 +16,7 @@ describe Nonprofits::RecurringDonationsController, type: :controller do end describe 'show' do - include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1', without_json_view: true + include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1', with_status: 200 end describe 'destroy' do