-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4414 from rubyforgood/kp/merge-line-items-at-requ…
…est-save Eagerly de-duplicating items when submitting request
- Loading branch information
Showing
10 changed files
with
126 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,7 @@ | |
let(:request) { create(:request, organization: organization) } | ||
let(:mail) { RequestsConfirmationMailer.confirmation_email(request) } | ||
|
||
let(:request_w_duplicates) { create(:request, :with_duplicates, organization: organization) } | ||
let(:request_w_varied_quantities) { create(:request, :with_varied_quantities, organization: organization) } | ||
let(:mail_w_duplicates) { RequestsConfirmationMailer.confirmation_email(request_w_duplicates) } | ||
let(:mail_w_varied_quantities) { RequestsConfirmationMailer.confirmation_email(request_w_varied_quantities) } | ||
|
||
describe "#confirmation_email" do | ||
|
@@ -23,12 +21,6 @@ | |
end | ||
end | ||
|
||
it 'handles duplicates' do | ||
organization.update!(email: "[email protected]") | ||
expect(mail_w_duplicates.body.encoded).to match('This is an email confirmation') | ||
expect(mail_w_duplicates.body.encoded).to match(' - 100') | ||
end | ||
|
||
it 'pairs the right quantities with the right item names' do | ||
organization.update!(email: "[email protected]") | ||
expect(mail_w_varied_quantities.body.encoded).to match('This is an email confirmation') | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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