Use local vars for tests

parent 0c34fa3e
...@@ -31,8 +31,8 @@ describe Gitlab::OAuth::User do ...@@ -31,8 +31,8 @@ describe Gitlab::OAuth::User do
describe :create do describe :create do
it "should create user from LDAP" do it "should create user from LDAP" do
@auth = double(info: info, provider: 'ldap') auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth) user = gl_auth.create(auth)
user.should be_valid user.should be_valid
user.extern_uid.should == info.uid user.extern_uid.should == info.uid
...@@ -40,8 +40,8 @@ describe Gitlab::OAuth::User do ...@@ -40,8 +40,8 @@ describe Gitlab::OAuth::User do
end end
it "should create user from Omniauth" do it "should create user from Omniauth" do
@auth = double(info: info, provider: 'twitter') auth = double(info: info, provider: 'twitter')
user = gl_auth.create(@auth) user = gl_auth.create(auth)
user.should be_valid user.should be_valid
user.extern_uid.should == info.uid user.extern_uid.should == info.uid
...@@ -49,8 +49,8 @@ describe Gitlab::OAuth::User do ...@@ -49,8 +49,8 @@ describe Gitlab::OAuth::User do
end end
it "should apply defaults to user" do it "should apply defaults to user" do
@auth = double(info: info, provider: 'ldap') auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth) user = gl_auth.create(auth)
user.should be_valid user.should be_valid
user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit 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