diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index 009517765..e8785e81c 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -25,7 +25,7 @@ sendgrid_category "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.html end @@ -36,7 +36,7 @@ sendgrid_category "Welcome" 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.html end diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb index 5e31b9429..500176087 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb @@ -6,17 +6,17 @@
-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: https://jamkazam.desk.com/customer/portal/articles/1304097-tutorial-videos
-Getting Started knowledge base articles: +Getting Started knowledge base articles: https://jamkazam.desk.com/customer/portal/topics/564807-getting-started/articles
-Support Portal in case you run into trouble and need help: +Support Portal in case you run into trouble and need help: https://jamkazam.desk.com/
diff --git a/web/spec/features/signup_spec.rb b/web/spec/features/signup_spec.rb index f0abf52dc..5439c6865 100644 --- a/web/spec/features/signup_spec.rb +++ b/web/spec/features/signup_spec.rb @@ -32,7 +32,21 @@ describe "Signup" do it { User.find_by_email('noone@jamkazam.com').musician_instruments.length.should == 1 } # an email is sent on no-invite signup 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')} + + 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 describe "with valid fan information" do @@ -78,7 +92,6 @@ describe "Signup" do it { page.should have_title("JamKazam") } 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 {uri = URI.parse(current_url); "#{uri.path}?#{uri.query}".should == congratulations_musician_path(:type => 'Native')} end