summaryrefslogtreecommitdiff
path: root/qa/spec/resource/user_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/resource/user_spec.rb')
-rw-r--r--qa/spec/resource/user_spec.rb76
1 files changed, 38 insertions, 38 deletions
diff --git a/qa/spec/resource/user_spec.rb b/qa/spec/resource/user_spec.rb
index d612dfc530e..dec08629701 100644
--- a/qa/spec/resource/user_spec.rb
+++ b/qa/spec/resource/user_spec.rb
@@ -6,88 +6,88 @@ describe QA::Resource::User do
name: "GitLab QA",
username: "gitlab-qa",
web_url: "https://staging.gitlab.com/gitlab-qa",
- public_email: "1614863-gitlab-qa@users.noreply.staging.gitlab.com"
+ public_email: "1614863-gitlab-qa@users.noreply.staging.gitlab.com",
}
end
- describe '#username' do
- it 'generates a default username' do
+ describe "#username" do
+ it "generates a default username" do
expect(subject.username).to match(/qa-user-\w+/)
end
- it 'is possible to set the username' do
- subject.username = 'johndoe'
+ it "is possible to set the username" do
+ subject.username = "johndoe"
- expect(subject.username).to eq('johndoe')
+ expect(subject.username).to eq("johndoe")
end
end
- describe '#password' do
- it 'generates a default password' do
- expect(subject.password).to eq('password')
+ describe "#password" do
+ it "generates a default password" do
+ expect(subject.password).to eq("password")
end
- it 'is possible to set the password' do
- subject.password = 'secret'
+ it "is possible to set the password" do
+ subject.password = "secret"
- expect(subject.password).to eq('secret')
+ expect(subject.password).to eq("secret")
end
end
- describe '#name' do
- it 'defaults to the username' do
+ describe "#name" do
+ it "defaults to the username" do
expect(subject.name).to eq(subject.username)
end
- it 'retrieves the name from the api_resource if present' do
+ it "retrieves the name from the api_resource if present" do
subject.__send__(:api_resource=, api_resource)
expect(subject.name).to eq(api_resource[:name])
end
- it 'is possible to set the name' do
- subject.name = 'John Doe'
+ it "is possible to set the name" do
+ subject.name = "John Doe"
- expect(subject.name).to eq('John Doe')
+ expect(subject.name).to eq("John Doe")
end
end
- describe '#email' do
- it 'defaults to the <username>@example.com' do
+ describe "#email" do
+ it "defaults to the <username>@example.com" do
expect(subject.email).to eq("#{subject.username}@example.com")
end
- it 'is possible to set the email' do
- subject.email = 'johndoe@example.org'
+ it "is possible to set the email" do
+ subject.email = "johndoe@example.org"
- expect(subject.email).to eq('johndoe@example.org')
+ expect(subject.email).to eq("johndoe@example.org")
end
end
- describe '#public_email' do
- it 'defaults to QA::Runtime::User.default_email' do
+ describe "#public_email" do
+ it "defaults to QA::Runtime::User.default_email" do
expect(subject.public_email).to eq(QA::Runtime::User.default_email)
end
- it 'retrieves the public_email from the api_resource if present' do
+ it "retrieves the public_email from the api_resource if present" do
subject.__send__(:api_resource=, api_resource)
expect(subject.public_email).to eq(api_resource[:public_email])
end
- it 'defaults to QA::Runtime::User.default_email if the public_email from the api_resource is blank' do
- subject.__send__(:api_resource=, api_resource.merge(public_email: ''))
+ it "defaults to QA::Runtime::User.default_email if the public_email from the api_resource is blank" do
+ subject.__send__(:api_resource=, api_resource.merge(public_email: ""))
expect(subject.public_email).to eq(QA::Runtime::User.default_email)
end
end
- describe '#credentials_given?' do
- it 'returns false when username and email have not been overridden' do
+ describe "#credentials_given?" do
+ it "returns false when username and email have not been overridden" do
expect(subject).not_to be_credentials_given
end
- it 'returns false even after username and email have been called' do
+ it "returns false even after username and email have been called" do
# Call #username and #password to ensure this doesn't set their respective
# instance variable.
subject.username
@@ -96,21 +96,21 @@ describe QA::Resource::User do
expect(subject).not_to be_credentials_given
end
- it 'returns false if only the username has been overridden' do
- subject.username = 'johndoe'
+ it "returns false if only the username has been overridden" do
+ subject.username = "johndoe"
expect(subject).not_to be_credentials_given
end
- it 'returns false if only the password has been overridden' do
- subject.password = 'secret'
+ it "returns false if only the password has been overridden" do
+ subject.password = "secret"
expect(subject).not_to be_credentials_given
end
- it 'returns true if both the username and password have been overridden' do
- subject.username = 'johndoe'
- subject.password = 'secret'
+ it "returns true if both the username and password have been overridden" do
+ subject.username = "johndoe"
+ subject.password = "secret"
expect(subject).to be_credentials_given
end