86 lines
2.7 KiB
Ruby
86 lines
2.7 KiB
Ruby
require 'spec_helper'
|
|
|
|
#NOTE: /landing/jamclass/retailers route is no longer available
|
|
|
|
# describe "School Landing", :js => true, :type => :feature, :capybara_feature => true do
|
|
|
|
# subject { page }
|
|
|
|
# before(:all) do
|
|
# ShoppingCart.delete_all
|
|
# JamTrackRight.delete_all
|
|
# JamTrack.delete_all
|
|
# JamTrackTrack.delete_all
|
|
# JamTrackLicensor.delete_all
|
|
# end
|
|
|
|
|
|
# before(:each) do
|
|
# AdminMailer.deliveries.clear
|
|
# end
|
|
|
|
# let(:user) { FactoryGirl.create(:user, country: 'US') }
|
|
|
|
|
|
# it "logged out" do
|
|
# visit "/landing/jamclass/retailers"
|
|
|
|
# find('h1.jam-track-name', text: 'MANAGE A MUSIC INSTRUMENT STORE?')
|
|
# find('h2.original-artist', text: 'Increase revenues without more inventory or space')
|
|
|
|
# find('button.cta-button', text: 'SIGN UP').click
|
|
|
|
# # should fail because we haven't filled out email/password/terms
|
|
# find('.register-area .errors', text: "Email can't be blank")
|
|
|
|
# fill_in "email", with: 'retailer_interest_123@jamkazam.com'
|
|
# fill_in "password", with: 'jam123'
|
|
# find('.register-area ins', visible: false).click
|
|
# find('button.cta-button', text: 'SIGN UP').click
|
|
|
|
# # this should show on the /client#/home page (WILL CHANGE)
|
|
# find('h2', text: 'sessions')
|
|
|
|
# AdminMailer.deliveries.count.should eql 3 # welcome email, partners ping about new user, and
|
|
|
|
# has_retailer_interest_email = false
|
|
# AdminMailer.deliveries.each do |d|
|
|
# puts d.subject
|
|
# if d.subject == ('retailer_interest_123@jamkazam.com' + ' is interested in retailer program')
|
|
# has_retailer_interest_email = true
|
|
# break
|
|
# end
|
|
# end
|
|
# has_retailer_interest_email.should be true
|
|
# user = User.find_by_email('retailer_interest_123@jamkazam.com')
|
|
# user.is_a_student.should be false
|
|
# user.is_a_teacher.should be false
|
|
# user.school_interest.should be false
|
|
# user.retailer_interest.should be true
|
|
# user.owned_retailer.should_not be_nil
|
|
# user.owned_retailer.affiliate_partner.should_not be_nil
|
|
# user.musician.should be true
|
|
# end
|
|
|
|
# it "logged in" do
|
|
# fast_signin(user,"/landing/jamclass/retailers")
|
|
|
|
# find('h1.jam-track-name', text: 'MANAGE A MUSIC INSTRUMENT STORE?')
|
|
# find('h2.original-artist', text: 'Increase revenues without more inventory or space')
|
|
|
|
|
|
# find('button.cta-button', text: 'SIGN UP').click
|
|
|
|
# # this should show on the /client#/home page (WILL CHANGE)
|
|
# find('h2', text: 'sessions')
|
|
|
|
# user.reload
|
|
# user.is_a_student.should be false
|
|
# user.is_a_teacher.should be false
|
|
# user.retailer_interest.should be true
|
|
# user.musician.should be true
|
|
# user.owned_retailer.should_not be_nil
|
|
# end
|
|
|
|
# end
|