This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
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 #389 from SumOfUs/development
release
- Loading branch information
Showing
19 changed files
with
93 additions
and
89 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(function(){ | ||
$.subscribe("pages:edit form:edit", function(){ | ||
$.subscribe("pages:new pages:edit form:edit", function(){ | ||
$('[data-toggle="tooltip"]').tooltip() | ||
}); | ||
}()); |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{% comment %} Description: A follow-up page thanking for donating money and asking to share {% endcomment %} | ||
|
||
{% capture confirmation %}{{ 'fundraiser.confirmation' | t }}{% endcapture %} | ||
{% capture message %}{{ 'fundraiser.thank_you' | t }}{% endcapture %} | ||
{% include 'Share Page', message: message %} | ||
{% include 'Share Page', message: message, confirmation: confirmation %} | ||
{% include 'Simple Footer', extra_class: 'simple-footer--stuck-to-bottom' %} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{% comment %} Description: A follow-up page thanking for signing a petition and asking to share {% endcomment %} | ||
|
||
{% capture confirmation %}{{ 'petition.confirmation' | t }}{% endcapture %} | ||
{% capture message %}{{ 'petition.thank_you' | val: 'petition_title', title | t }}{% endcapture %} | ||
{% include 'Share Page', message: message %} | ||
{% include 'Share Page', message: message, confirmation: confirmation %} | ||
{% include 'Simple Footer', extra_class: 'simple-footer--stuck-to-bottom' %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ de: | |
card_declined: Der Zahlungsdienst hat Ihre Kreditkarte nicht akzeptiert. Bitte wählen Sie eine andere Zahlungsmethode. | ||
unknown_error: Unbekannter Fehler. Unser Team wurde benachrichtigt. Bitte überprüfen Sie Ihre Eingaben oder wählen Sie eine andere Zahlungsmethode. | ||
fine_print: "SumOfUs ist eine eingetragene Non-Profit-Organisation (501(c)4) mit Sitz in Washington DC, USA. Spenden an SumOfUs können nicht von der Steuer abgesetzt werden. Für mehr Informationen schreiben Sie uns bitte eine E-Mail an [email protected]." | ||
confirmation: Donation received # FIXME - STILL IN ENGLISH! | ||
fields: | ||
cvv: Kartenprüfnummer | ||
number: Kreditkartennummer | ||
|
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 |
---|---|---|
|
@@ -23,6 +23,7 @@ en: | |
card_declined: Your card was declined by the payment processor. Please try a different payment method. | ||
unknown_error: Our technical team has been notified. Please double check your info or try a different payment method. | ||
fine_print: "SumOfUs is a registered 501(c)4 non-profit incorporated in Washington, DC, United States. Contributions or gifts to SumOfUs are not tax deductible. For further information, please contact [email protected]." | ||
confirmation: Donation received | ||
fields: | ||
cvv: CVV | ||
number: Card number | ||
|
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 |
---|---|---|
|
@@ -23,6 +23,7 @@ fr: | |
card_declined: Votre carte a été refusée par le service de paiement. Veuillez choisir une autre méthode de paiement. | ||
unknown_error: Notre équipe technique a été notifiée de ce problème. Veuillez revérifier vos informations ou choisir une autre méthode de paiement. | ||
fine_print: "SumOfUs est une ONG déclarée 501(c)4 à Washington DC, USA. Les contributions ou dons ne sont pas déductibles des impôts. Pour plus d’informations, veuillez nous contacter à cette adresse: [email protected]" | ||
confirmation: Don reçu | ||
fields: | ||
cvv: CVV | ||
number: Numéro de votre carte | ||
|
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 |
---|---|---|
|
@@ -50,6 +50,49 @@ | |
end | ||
end | ||
|
||
describe 'validations' do | ||
describe 'email' do | ||
before do | ||
create(:member, email: '[email protected]') | ||
end | ||
|
||
it 'must be unique' do | ||
member = build(:member, email: '[email protected]') | ||
expect(member).to be_invalid | ||
expect(member.errors[:email]).to eq(["has already been taken"]) | ||
end | ||
|
||
it 'can be nil' do | ||
expect{ | ||
create(:member, email: nil) | ||
create(:member, email: nil) | ||
}.to_not raise_error | ||
end | ||
end | ||
end | ||
|
||
describe 'email' do | ||
it 'is downcased on create' do | ||
member = create(:member, email: '[email protected]') | ||
expect(member.email).to eq('[email protected]') | ||
end | ||
|
||
it 'is downcased on save' do | ||
member = create(:member, email: '[email protected]') | ||
member.update(email: '[email protected]') | ||
expect(member.email).to eq('[email protected]') | ||
end | ||
|
||
it 'is fine with nil' do | ||
expect{ | ||
create(:member, email: nil) | ||
}.to change{Member.count}. | ||
from(0).to(1) | ||
|
||
expect(Member.last.email).to be nil | ||
end | ||
end | ||
|
||
describe 'liquid_data' do | ||
it 'includes all attributes, plus name and welcome_name' do | ||
m = create :member | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
email: "[email protected]", | ||
postal: "11225", | ||
address1: '25 Elm Drive', | ||
akid: '1234.5678.9910', | ||
source: 'fb', | ||
country: "US" | ||
} | ||
|
@@ -124,6 +125,7 @@ | |
country: "US", | ||
postal: "11225", | ||
address1: '25 Elm Drive', | ||
akid: '1234.5678.9910', | ||
source: 'fb', | ||
first_name: 'Bernie', | ||
last_name: 'Sanders' | ||
|
@@ -334,6 +336,7 @@ | |
email: "[email protected]", | ||
country: "US", | ||
postal: "11225", | ||
akid: '1234.5678.9910', | ||
source: 'fb', | ||
address1: '25 Elm Drive', | ||
first_name: 'Bernie', | ||
|
@@ -640,6 +643,7 @@ | |
country: "US", | ||
postal: "11225", | ||
address1: '25 Elm Drive', | ||
akid: '1234.5678.9910', | ||
source: 'fb', | ||
first_name: 'Bernie', | ||
last_name: 'Sanders' | ||
|
@@ -888,6 +892,7 @@ | |
address1: '25 Elm Drive', | ||
first_name: 'Bernie', | ||
last_name: 'Sanders', | ||
akid: '1234.5678.9910', | ||
source: 'fb' | ||
}, | ||
action: { | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
email: "[email protected]", | ||
postal: "11225", | ||
address1: '25 Elm Drive', | ||
akid: '1234.5678.9910', | ||
source: 'fb', | ||
country: "US" | ||
} | ||
|
@@ -108,6 +109,7 @@ | |
postal: "11225", | ||
address1: '25 Elm Drive', | ||
source: 'fb', | ||
akid: '1234.5678.9910', | ||
first_name: 'Bernie', | ||
last_name: 'Sanders' | ||
}, | ||
|
@@ -160,6 +162,7 @@ | |
postal: "11225", | ||
address1: '25 Elm Drive', | ||
source: 'fb', | ||
akid: '1234.5678.9910', | ||
first_name: 'Bernie', | ||
last_name: 'Sanders' | ||
}, | ||
|
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