Use local vars for tests
This commit is contained in:
parent
0c34fa3ea0
commit
0ec4abf73c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue