BigW Consortium Gitlab

Use local vars for tests

parent 0c34fa3e
......@@ -31,8 +31,8 @@ describe Gitlab::OAuth::User do
describe :create do
it "should create user from LDAP" do
@auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'ldap')
user = gl_auth.create(auth)
user.should be_valid
user.extern_uid.should == info.uid
......@@ -40,8 +40,8 @@ describe Gitlab::OAuth::User do
end
it "should create user from Omniauth" do
@auth = double(info: info, provider: 'twitter')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'twitter')
user = gl_auth.create(auth)
user.should be_valid
user.extern_uid.should == info.uid
......@@ -49,8 +49,8 @@ describe Gitlab::OAuth::User do
end
it "should apply defaults to user" do
@auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'ldap')
user = gl_auth.create(auth)
user.should be_valid
user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment