-
Notifications
You must be signed in to change notification settings - Fork 123
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 #1666 from phong-nguyen-duy/my-master
Bump bricks version to 3.7.19 Reviewed-by: https://github.com/danh-ung
- Loading branch information
Showing
18 changed files
with
11,626 additions
and
1,418 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.7.18 | ||
3.7.19 |
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 |
---|---|---|
|
@@ -44,16 +44,6 @@ | |
end | ||
end | ||
|
||
describe '#find_user_by_login' do | ||
it 'Should find user by login' do | ||
domain = @client.domain(ConnectionHelper::DEFAULT_DOMAIN) | ||
user = domain.find_user_by_login(ConnectionHelper::DEFAULT_USERNAME) | ||
|
||
expect(user).to be_an_instance_of(GoodData::Profile) | ||
expect(user.login).to eq ConnectionHelper::DEFAULT_USERNAME | ||
end | ||
end | ||
|
||
describe '#users' do | ||
it 'Should list users' do | ||
users = @domain.users | ||
|
@@ -119,7 +109,7 @@ | |
|
||
it 'updates properties of a profile' do | ||
user = @domain.users | ||
.reject { |u| u.login == ConnectionHelper::DEFAULT_USERNAME }.first | ||
.reject { |u| u.login == ConnectionHelper::DEFAULT_USERNAME }.first | ||
|
||
old_email = user.email | ||
old_sso_provider = user.sso_provider || '' | ||
|
@@ -138,6 +128,40 @@ | |
end | ||
end | ||
|
||
describe '#find_user_by_login' do | ||
it 'Should find user by login' do | ||
domain = @client.domain(ConnectionHelper::DEFAULT_DOMAIN) | ||
user = domain.find_user_by_login(ConnectionHelper::DEFAULT_USERNAME) | ||
|
||
expect(user).to be_an_instance_of(GoodData::Profile) | ||
expect(user.login).to eq ConnectionHelper::DEFAULT_USERNAME | ||
end | ||
|
||
it 'Should find user by users with same result' do | ||
domain = @client.domain(ConnectionHelper::DEFAULT_DOMAIN) | ||
login = "[email protected]" | ||
password = 'gemtest871382persistent' | ||
user = domain.find_user_by_login(login) | ||
user.delete if user | ||
user = domain.add_user(:login => login, :password => password, :first_name => 'X', :last_name => 'X') | ||
@users_to_delete << user | ||
client_normal = GoodData.connect(login, password, :server => GoodData::Environment::ConnectionHelper::DEFAULT_SERVER, :verify_ssl => OpenSSL::SSL::VERIFY_NONE) | ||
begin | ||
client_normal.domain(ConnectionHelper::DEFAULT_DOMAIN).find_user_by_login(login) | ||
raise 'Must be domain admin' | ||
rescue RestClient::Forbidden => e | ||
expect(e.message).to include('Can be accessed only by domain admin') | ||
end | ||
user = domain.find_user_by_login(login) | ||
expect(user).to be_an_instance_of(GoodData::Profile) | ||
expect(user.login).to eq login | ||
user = domain.users(login) | ||
expect(user).to be_an_instance_of(GoodData::Profile) | ||
expect(user.login).to eq login | ||
client_normal.disconnect | ||
end | ||
end | ||
|
||
describe '#clients' do | ||
subject { GoodData::Domain.new('my_domain') } | ||
let(:client) { double('client') } | ||
|
Oops, something went wrong.