-
-
Notifications
You must be signed in to change notification settings - Fork 509
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 #824 from rubyforgood/partner-status-emails-seeds
Make all partners require an invite to join partnerbase. Added/change…
- Loading branch information
Showing
9 changed files
with
23 additions
and
26 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 |
---|---|---|
|
@@ -74,10 +74,10 @@ | |
Partner.find_or_create_by!(name: "Pawnee Parent Service", email: "[email protected]", status: :approved) do |partner| | ||
partner.organization = pdx_org | ||
end | ||
Partner.find_or_create_by!(name: "Pawnee Homeless Shelter", email: "[email protected]") do |partner| | ||
Partner.find_or_create_by!(name: "Pawnee Homeless Shelter", email: "[email protected]", status: :invited) do |partner| | ||
partner.organization = pdx_org | ||
end | ||
Partner.find_or_create_by!(name: "Pawnee Pregnancy Center", email: "[email protected]") do |partner| | ||
Partner.find_or_create_by!(name: "Pawnee Pregnancy Center", email: "[email protected]", status: :invited) do |partner| | ||
partner.organization = pdx_org | ||
end | ||
|
||
|
@@ -221,9 +221,9 @@ def random_record(klass) | |
Request.create( | ||
partner: random_record(Partner), | ||
organization: random_record(Organization), | ||
request_items: { k_size5: 3, | ||
k_size6: 2 | ||
}, | ||
request_items: [{ "item_id" => Item.all.pluck(:id).sample, "quantity" => 3}, | ||
{ "item_id" => Item.all.pluck(:id).sample, "quantity" => 2} | ||
], | ||
comments: "Urgent", | ||
status: status | ||
) | ||
|
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 |
---|---|---|
|
@@ -28,14 +28,14 @@ | |
visit url_prefix + "/partners/new" | ||
fill_in "Name", with: "Frank" | ||
fill_in "E-mail", with: "[email protected]" | ||
click_button "Send Invitation" | ||
click_button "Add Partner Agency" | ||
|
||
expect(page.find(".alert")).to have_content "added" | ||
end | ||
|
||
scenario "User creates a new partner with empty name" do | ||
visit url_prefix + "/partners/new" | ||
click_button "Send Invitation" | ||
click_button "Add Partner Agency" | ||
|
||
expect(page.find(".alert")).to have_content "didn't work" | ||
end | ||
|
@@ -66,7 +66,7 @@ | |
|
||
within("table > tbody > tr:nth-child(1) > td.text-right") { click_on "Invite" } | ||
invite_alert = page.driver.browser.switch_to.alert | ||
expect(invite_alert.text).to eq("Send an invitation to #{partner.name}?") | ||
expect(invite_alert.text).to eq("Send an invitation to #{partner.name} to begin using the partner application?") | ||
|
||
invite_alert.accept | ||
expect(page.find(".alert")).to have_content "invited!" | ||
|
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