-
Notifications
You must be signed in to change notification settings - Fork 27
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
918008e
commit e3d11a7
Showing
3 changed files
with
20 additions
and
2 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 |
---|---|---|
|
@@ -10,10 +10,22 @@ | |
include_examples 'listable integration' | ||
|
||
describe 'list' do | ||
it "finds customers filtered with query" do | ||
it 'finds customers filtered with query' do | ||
result = described_class.list(query: '(email="[email protected]")') | ||
|
||
expect(result).to be_a Array | ||
expect(result).to all(be_a(described_class)) | ||
end | ||
end | ||
|
||
describe '#update_email' do | ||
it 'updates the customer email' do | ||
customer = described_class.get(id) | ||
original_email = customer.emails.first | ||
new_email = "changed#{original_email[:value]}" | ||
|
||
expect(customer.update_email(original_email[:id], new_email, type: original_email[:type])).to be_truthy | ||
expect(described_class.get(id).emails.first[:value]).to eq(new_email) | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
expect(subject).to all(be_a(described_class)) | ||
end | ||
end | ||
end | ||
end |