File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ def create
44
44
# TODO: Send already subscribed email
45
45
end
46
46
47
- redirect_to users_newsletter_subscription_path ( @newsletter_subscription ) ,
48
- notice : "Welcome to Joy of Rails! Please check your email for confirmation instructions"
47
+ redirect_to users_newsletter_subscription_path ( @newsletter_subscription )
49
48
end
50
49
51
50
def subscribe
Original file line number Diff line number Diff line change 68
68
} . to change ( User , :count ) . by ( 1 )
69
69
70
70
expect ( response ) . to redirect_to ( users_newsletter_subscription_path ( User . last . newsletter_subscription ) )
71
- expect ( flash [ :notice ] ) . to eq ( "Welcome to Joy of Rails! Please check your email for confirmation instructions" )
72
71
73
72
perform_enqueued_jobs_and_subsequently_enqueued_jobs
74
73
90
89
} . not_to change ( NewsletterSubscription , :count )
91
90
92
91
expect ( response ) . to redirect_to ( users_newsletter_subscription_path ( User . last . newsletter_subscription ) )
93
- expect ( flash [ :notice ] ) . to eq ( "Welcome to Joy of Rails! Please check your email for confirmation instructions" )
94
92
95
93
expect ( user . reload . newsletter_subscription ) . to be_present
96
94
# assert "already subscribed" email sent
105
103
} . to change ( NewsletterSubscription , :count ) . by ( 1 )
106
104
107
105
expect ( response ) . to redirect_to ( users_newsletter_subscription_path ( User . last . newsletter_subscription ) )
108
- expect ( flash [ :notice ] ) . to eq ( "Welcome to Joy of Rails! Please check your email for confirmation instructions" )
109
106
110
107
expect ( user . reload . newsletter_subscription ) . to be_present
111
108
end
You can’t perform that action at this time.
0 commit comments