-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4cb044
commit 0299817
Showing
3 changed files
with
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,46 +38,16 @@ | |
expect(Decidim::Vocdoni::Wallet.count).to eq 1 | ||
end | ||
|
||
context "when prod environment" do | ||
before do | ||
allow(Decidim::Vocdoni).to receive(:api_endpoint_env).and_return("prod") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_name).and_return("Test reseller") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_email).and_return("[email protected]") | ||
end | ||
|
||
it "shows the information about receiving coins" do | ||
visit_steps_page | ||
|
||
expect(page).to have_content("The usage of the Vocdoni platform has costs") | ||
expect(page).to have_content("Test reseller") | ||
expect(page).to have_css("input[value='#{wallet.private_key}']") | ||
expected_href = "mailto:[email protected]?subject=Decidim Vocdoni Inquiry&body=Please provide a quote for the Vocdoni platform usage. My organization Vocdoni address is: 0x0000000000000000000000000000000000000000000000000000000000000001" | ||
expect(page).to have_css("a[href='#{expected_href}']") | ||
end | ||
end | ||
|
||
context "when stg environment" do | ||
shared_context "with environment settings" do |env| | ||
before do | ||
allow(Decidim::Vocdoni).to receive(:api_endpoint_env).and_return("stg") | ||
allow(Decidim::Vocdoni).to receive(:api_endpoint_env).and_return(env) | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_name).and_return("Test reseller") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_email).and_return("[email protected]") | ||
end | ||
|
||
it "doesn't show the information about receiving coins" do | ||
visit_steps_page | ||
|
||
expect(page).to have_no_content("The usage of the Vocdoni platform has costs") | ||
expect(page).to have_no_content("Test reseller") | ||
expect(page).to have_no_css("input[value='#{wallet.private_key}']") | ||
end | ||
end | ||
|
||
context "when prod environment" do | ||
before do | ||
allow(Decidim::Vocdoni).to receive(:api_endpoint_env).and_return("prod") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_name).and_return("Test reseller") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_email).and_return("[email protected]") | ||
end | ||
include_context "with environment settings", "prod" | ||
|
||
it "shows the information about receiving coins" do | ||
visit_steps_page | ||
|
@@ -91,11 +61,7 @@ | |
end | ||
|
||
context "when stg environment" do | ||
before do | ||
allow(Decidim::Vocdoni).to receive(:api_endpoint_env).and_return("stg") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_name).and_return("Test reseller") | ||
allow(Decidim::Vocdoni).to receive(:vocdoni_reseller_email).and_return("[email protected]") | ||
end | ||
include_context "with environment settings", "stg" | ||
|
||
it "doesn't show the information about receiving coins" do | ||
visit_steps_page | ||
|
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