* VRFS-711 - added test to prove that the welcome email comes back after you click signup confirm
This commit is contained in:
parent
b8eefb717c
commit
71710f1ce8
|
|
@ -25,7 +25,7 @@
|
||||||
sendgrid_category "Confirm Email"
|
sendgrid_category "Confirm Email"
|
||||||
sendgrid_unique_args :type => "confirm_email"
|
sendgrid_unique_args :type => "confirm_email"
|
||||||
|
|
||||||
mail(:to => user.email, :subject => "#{user.first_name}, please confirm your JamKazam email") do |format|
|
mail(:to => user.email, :subject => "Please confirm your JamKazam email") do |format|
|
||||||
format.text
|
format.text
|
||||||
format.html
|
format.html
|
||||||
end
|
end
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
sendgrid_category "Welcome"
|
sendgrid_category "Welcome"
|
||||||
sendgrid_unique_args :type => "welcome_message"
|
sendgrid_unique_args :type => "welcome_message"
|
||||||
|
|
||||||
mail(:to => user.email, :subject => "Welcome to JamKazam, #{user.first_name}") do |format|
|
mail(:to => user.email, :subject => "Welcome to JamKazam") do |format|
|
||||||
format.text
|
format.text
|
||||||
format.html
|
format.html
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,17 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Tutorial videos that show you how to use the key features of the product:
|
Tutorial videos that show you how to use the key features of the product:</br>
|
||||||
<a href="https://jamkazam.desk.com/customer/portal/articles/1304097-tutorial-videos">https://jamkazam.desk.com/customer/portal/articles/1304097-tutorial-videos</a>
|
<a href="https://jamkazam.desk.com/customer/portal/articles/1304097-tutorial-videos">https://jamkazam.desk.com/customer/portal/articles/1304097-tutorial-videos</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Getting Started knowledge base articles:
|
Getting Started knowledge base articles:</br>
|
||||||
<a href="https://jamkazam.desk.com/customer/portal/topics/564807-getting-started/articles">https://jamkazam.desk.com/customer/portal/topics/564807-getting-started/articles</a>
|
<a href="https://jamkazam.desk.com/customer/portal/topics/564807-getting-started/articles">https://jamkazam.desk.com/customer/portal/topics/564807-getting-started/articles</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Support Portal in case you run into trouble and need help:
|
Support Portal in case you run into trouble and need help:</br>
|
||||||
<a href="https://jamkazam.desk.com/">https://jamkazam.desk.com/</a>
|
<a href="https://jamkazam.desk.com/">https://jamkazam.desk.com/</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,21 @@ describe "Signup" do
|
||||||
it { User.find_by_email('noone@jamkazam.com').musician_instruments.length.should == 1 }
|
it { User.find_by_email('noone@jamkazam.com').musician_instruments.length.should == 1 }
|
||||||
# an email is sent on no-invite signup
|
# an email is sent on no-invite signup
|
||||||
it { UserMailer.deliveries.length.should == 1 }
|
it { UserMailer.deliveries.length.should == 1 }
|
||||||
|
it { UserMailer.deliveries[0].html_part.body.include?("To confirm this email address")== 1 }
|
||||||
it {uri = URI.parse(current_url); "#{uri.path}?#{uri.query}".should == congratulations_musician_path(:type => 'Native')}
|
it {uri = URI.parse(current_url); "#{uri.path}?#{uri.query}".should == congratulations_musician_path(:type => 'Native')}
|
||||||
|
|
||||||
|
describe "user can confirm email and receive welcome email" do
|
||||||
|
|
||||||
|
before(:each) do
|
||||||
|
UserMailer.deliveries.clear
|
||||||
|
visit signup_confirm_path(User.find_by_email('noone@jamkazam.com').signup_token)
|
||||||
|
end
|
||||||
|
|
||||||
|
it { page.should have_title("JamKazam") }
|
||||||
|
it { should have_selector('h2', text: "musicians") }
|
||||||
|
it { UserMailer.deliveries.length.should == 1 }
|
||||||
|
it { UserMailer.deliveries[0].html_part.body.include?("Following are links to some resources")== 1 }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "with valid fan information" do
|
describe "with valid fan information" do
|
||||||
|
|
@ -78,7 +92,6 @@ describe "Signup" do
|
||||||
it { page.should have_title("JamKazam") }
|
it { page.should have_title("JamKazam") }
|
||||||
it { should have_selector('h1', text: "congratulations") }
|
it { should have_selector('h1', text: "congratulations") }
|
||||||
|
|
||||||
# there is no email sent though when you signup based on an invite (because you just left your email to get here)
|
|
||||||
it { UserMailer.deliveries.length.should == 1 }
|
it { UserMailer.deliveries.length.should == 1 }
|
||||||
it {uri = URI.parse(current_url); "#{uri.path}?#{uri.query}".should == congratulations_musician_path(:type => 'Native')}
|
it {uri = URI.parse(current_url); "#{uri.path}?#{uri.query}".should == congratulations_musician_path(:type => 'Native')}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue