test(edit): fix edit actions controller expect to html render method

This commit is contained in:
Luis Castro 2019-08-01 10:46:19 +02:00
parent f0fd393be4
commit 2c12b5864b
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639
2 changed files with 2 additions and 1 deletions

View file

@ -29,6 +29,7 @@ class TicketsController < ApplicationController
@panels_layout = true @panels_layout = true
@nonprofit = current_nonprofit @nonprofit = current_nonprofit
@event = current_event @event = current_event
respond_to do |format| respond_to do |format|
format.html format.html
format.csv do format.csv do

View file

@ -85,7 +85,7 @@ RSpec.shared_context :shared_user_context do
end end
def accept(user_to_signin, method, action, *args) def accept(user_to_signin, method, action, *args)
without_json_response = %i[cancellation all_npos confirmation peer_to_peer].include?(action) without_json_response = %i[cancellation all_npos edit confirmation peer_to_peer].include?(action)
request.accept = 'application/json' unless without_json_response request.accept = 'application/json' unless without_json_response
sign_in user_to_signin if user_to_signin sign_in user_to_signin if user_to_signin
# allows us to run the helpers but ignore what the controller action does # allows us to run the helpers but ignore what the controller action does