File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
spec/requests/better_together Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 22
33require 'rails_helper'
44
5- RSpec . describe 'Setup Wizard completion' , type : :request do
6- let! ( :platform ) { create ( :better_together_platform , :host , privacy : 'private' ) }
5+ RSpec . describe 'Setup Wizard completion' do
76 let! ( :wizard ) { BetterTogether ::Wizard . find_by! ( identifier : 'host_setup' ) }
8- let! ( :user ) { create ( :better_together_user , :confirmed , :platform_manager ) }
97
108 before do
119 wizard . mark_completed
12- login_as ( user , scope : :user )
1310 end
1411
1512 it 'redirects to the success path with notice preserved' do
1613 get better_together . setup_wizard_path ( locale : I18n . locale )
1714 expect ( response ) . to redirect_to ( wizard . success_path )
1815
19- follow_redirect!
20- expect ( response . body ) . to include ( wizard . success_message )
16+ # The controller preserves the notice in the flash; assert it directly
17+ expect ( flash [ :notice ] ) . to eq ( wizard . success_message )
2118 end
2219end
You can’t perform that action at this time.
0 commit comments