Last active
August 29, 2015 14:11
-
-
Save dan-palmer/36fad9d0128fd37cc8a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
feature 'Confirmation Group Payment With Remission', type: :feature do | |
attr_reader :claim, :recipients, :email, :body | |
before :all do | |
@claim = create :claim, :group_payment_with_remission | |
@recipients = ["[email protected]"] | |
@email = BaseMailer.confirmation_email(claim, recipients).deliver_now | |
@body = email.parts.first.body.raw_source | |
end | |
include_context "a Confirmation Email" | |
it "has a greeting" do | |
greeting = "Thank you for submitting your claim to an employment tribunal." | |
expect(body).to have_text greeting | |
end | |
describe "what happens next" do | |
it "has 'apply for fee remission' text" do | |
content = <<-eos | |
You have said you want to apply for fee | |
remission. You must apply within 7 days, | |
or your claim may be rejected. | |
eos | |
expect(body).to have_text content | |
end | |
it "has an 'apply for fee remisison' button" do | |
expect(body).to have_link "Apply for fee remission" | |
end | |
it "has 'apply for fee remission' text" do | |
content = <<-eos | |
We’ll review your claim for remission and | |
contact you to explain the next steps. | |
eos | |
expect(body).to have_text content | |
end | |
end | |
describe "submission details" do | |
it "has a 'Claim completed' section" do | |
expect(body).to have_text "Claim completedSee attached PDF" | |
end | |
it "has a 'Claim submitted' section" do | |
expect(body).to have_text "Claim submittedSubmitted #{Time.now.strftime '%d %B %Y'}" | |
end | |
it "has an 'Attachments submitted' section" do | |
expect(body).to have_text "Attachments submittedfile.rtffile.csv" | |
end | |
it "has an 'Issue fee paid' section" do | |
expect(body).to have_text "Issue fee paid£250.00" | |
end | |
end | |
describe "further information" do | |
it "has contact details" do | |
expect(body).to have_text "England & Wales: 0300 123 1024" | |
expect(body).to have_text "Scotland: 0141 354 8574" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment