Skip to content

Commit

Permalink
more tests and one less fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed May 4, 2016
1 parent 99caa92 commit f5eb848
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/models/chargify_product_link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
ENV["CHARGIFY_PAGE_IDS"] = "individual_supporter,1234"

allow(member).to receive(:individual?).and_return(true)
allow(member).to receive(:no_payment?).and_return(false)
allow(member).to receive(:plan).and_return("individual-supporter")
allow(member).to receive(:subscription_amount).and_return(10)
allow(member).to receive(:price_without_vat).and_return(8.33)
Expand Down Expand Up @@ -91,6 +92,15 @@
end
end

context "free individual" do
it "should return 'individual_pay_what_you_like_free'" do
allow(member).to receive(:individual?).and_return(true)
allow(member).to receive(:no_payment?).and_return(true)

expect(subject.public_signup_page_key).to eq(:individual_pay_what_you_like_free)
end
end

context "student" do
it "should return 'individual_supporter_student'" do
allow(member).to receive(:student?).and_return(true)
Expand Down Expand Up @@ -156,6 +166,7 @@
:individual_supporter_student_free => "456",
:supporter_monthly => "789",
:individual_pay_what_you_like => "111213",
:individual_pay_what_you_like_free => "1234",
:supporter_annual => "345",
:corporate_supporter_annual => "678"
)
Expand Down

0 comments on commit f5eb848

Please sign in to comment.