-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regenerate random symbol for provider. #335
- Loading branch information
Martin Fenner
committed
Aug 8, 2019
1 parent
2f02d9d
commit c17e789
Showing
7 changed files
with
42 additions
and
11 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
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 |
---|---|---|
|
@@ -473,13 +473,8 @@ | |
it 'creates a provider' do | ||
post '/providers', params, headers | ||
|
||
expect(json.dig('data', 'attributes', 'systemEmail')).to eq("[email protected]") | ||
end | ||
|
||
it 'returns status code 200' do | ||
post '/providers', params, headers | ||
|
||
expect(last_response.status).to eq(200) | ||
expect(json.dig('data', 'attributes', 'systemEmail')).to eq("[email protected]") | ||
end | ||
end | ||
|
||
|
@@ -502,13 +497,27 @@ | |
it 'creates a provider' do | ||
post '/providers', params, headers | ||
|
||
expect(last_response.status).to eq(200) | ||
expect(json.dig('data', 'attributes', 'systemEmail')).to eq("[email protected]") | ||
end | ||
end | ||
|
||
it 'returns status code 200' do | ||
context 'generate random symbol' do | ||
let(:params) do | ||
{ "data" => { "type" => "providers", | ||
"attributes" => { | ||
"name" => "Admin", | ||
"displayName" => "Admin", | ||
"region" => "EMEA", | ||
"systemEmail" => "[email protected]", | ||
"country" => "GB" } } } | ||
end | ||
|
||
it 'creates a provider' do | ||
post '/providers', params, headers | ||
|
||
expect(last_response.status).to eq(200) | ||
expect(json.dig('data', 'attributes', 'symbol')).to match(/\A[A-Z]{4}\Z/) | ||
end | ||
end | ||
|
||
|