Skip to content
Snippets Groups Projects
Commit d48805ba authored by Izaak Alpert's avatar Izaak Alpert Committed by Wes Gurney
Browse files

Style guide fixes (spacing)

Change-Id: I966bfd0ccc4b05925384ecab8c6cbe3c6ba3b667
parent 3f73ea48
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
Loading
Loading
@@ -17,7 +17,6 @@ describe API do
env[API::APIHelpers::SUDO_HEADER] = identifier
end
 
def set_param(token_usr, identifier)
clear_env
clear_param
Loading
Loading
@@ -25,7 +24,6 @@ describe API do
params[API::APIHelpers::SUDO_PARAM] = identifier
end
 
def clear_env
env.delete(API::APIHelpers::PRIVATE_TOKEN_HEADER)
env.delete(API::APIHelpers::SUDO_HEADER)
Loading
Loading
@@ -70,6 +68,7 @@ describe API do
set_param(user, admin.username)
expect { current_user }.to raise_error
end
it "should throw an error when the user cannot be found for a given id" do
id = user.id + admin.id
user.id.should_not == id
Loading
Loading
@@ -80,6 +79,7 @@ describe API do
set_param(admin, id)
expect { current_user }.to raise_error
end
it "should throw an error when the user cannot be found for a given username" do
username = "#{user.username}#{admin.username}"
user.username.should_not == username
Loading
Loading
@@ -90,6 +90,7 @@ describe API do
set_param(admin, username)
expect { current_user }.to raise_error
end
it "should handle sudo's to oneself" do
set_env(admin, admin.id)
current_user.should == admin
Loading
Loading
@@ -116,6 +117,7 @@ describe API do
current_user.should == user
current_user.should == user
end
it "should handle multiple sudo's to oneself using string ids" do
set_env(admin, user.id.to_s)
current_user.should == user
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment