-
Notifications
You must be signed in to change notification settings - Fork 78
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 #364 from ansonK/redirect-after-signing-petition
Redirect to clean petition url
- Loading branch information
Showing
10 changed files
with
90 additions
and
23 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
5 changes: 5 additions & 0 deletions
5
db/migrate/20150730110838_add_seen_signed_confirmation_page_to_signatures.rb
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddSeenSignedConfirmationPageToSignatures < ActiveRecord::Migration | ||
def change | ||
add_column :signatures, :seen_signed_confirmation_page, :boolean, null: false, default: false | ||
end | ||
end |
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 |
---|---|---|
|
@@ -127,6 +127,15 @@ def should_be_signature_count_of(count) | |
:postcode => "SW14 9RQ", :name => "Sam Wibbledon") | ||
end | ||
|
||
Given(/^Suzie has already signed the petition and validated her email$/) do | ||
@suzies_signature = FactoryGirl.create(:validated_signature, :petition => @petition, :email => "[email protected]", | ||
:postcode => "SW14 9RQ", :name => "Womboid Wibbledon") | ||
end | ||
|
||
When(/^Suzie shares the signatory confirmation link with Eric$/) do | ||
@shared_link = signed_signature_url(@suzies_signature, token: @suzies_signature.perishable_token) | ||
end | ||
|
||
When /^I try to sign the petition with the same email address and a different name$/ do | ||
steps %Q{ | ||
When I decide to sign the petition | ||
|
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