-
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 d2c1a3f
Showing
2 changed files
with
19 additions
and
1 deletion.
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 |