-
-
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.
Make purchase helper pick default storage location (#4722)
* Make purchase helper pick default storage location Changed the purchase helper to use the default storage location of the organization first, before using any other storage locations that are available. Also added a (failing) spec to check that we can see the option on the page. Should be fixed in the next commit * Fix test by using extended format and `subject` Fixed the failing test by using the extended format of the test expectation and used `subject` to make an assertion regarding the response body. * Add test that new donation has default storage location Added a test that when we begin to make a new donation, we have a default storage location set. * Switch to use helper to set default storage location Switched to use the helper method from PurchasesHelper to set the default storage location for a donation * Address review feedback Addressed review feedback namely: * Renaming new_purchase_default_location to set_default_location and moving it to ApplicationHelper. This allows us to use across both the donation and purchase forms. * Updated the tests and forms accordingly * Added specs to ApplicationHelper to test that we are able to successfully set the default storage location for purchases and donations. * Rename method, have only one test Renamed the method as per review suggestion and keep only one test since we only need to test that the default storage location is successfully set * Update set_default_location to default_location * Update method references in view code * Update spec to match new behaviour Updated spec to match the new behaviour of the donation form.
- Loading branch information
1 parent
d60dfae
commit ec818ce
Showing
8 changed files
with
73 additions
and
27 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
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