From 71710f1ce8e30d38af008e6489d4a93885410413 Mon Sep 17 00:00:00 2001
From: Seth Call
-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