Sign out user before running tests
This commit is contained in:
parent
f3570acf7c
commit
e23d16c135
|
@ -13,10 +13,10 @@
|
|||
Travis.setLocale Travis.default_locale
|
||||
@set('state', 'signed-out')
|
||||
@set('user', undefined)
|
||||
user = Travis.__container__.lookup('controller:currentUser').get('content')
|
||||
if user.get('stateManager.currentPath') == 'rootState.loaded.updated.uncommitted'
|
||||
user.send('rollback')
|
||||
user.unloadRecord()
|
||||
if user = Travis.__container__.lookup('controller:currentUser').get('content')
|
||||
if user.get('stateManager.currentPath') == 'rootState.loaded.updated.uncommitted'
|
||||
user.send('rollback')
|
||||
user.unloadRecord()
|
||||
Travis.__container__.lookup('controller:currentUser').set('content', null)
|
||||
Travis.__container__.lookup('router:main').send('afterSignOut')
|
||||
|
||||
|
|
|
@ -2,10 +2,8 @@ describe 'on the "build" state', ->
|
|||
beforeEach ->
|
||||
app '/travis-ci/travis-core/builds/1'
|
||||
|
||||
console.log 'wait for repos'
|
||||
waitFor reposRendered
|
||||
runs ->
|
||||
console.log 'wait for build'
|
||||
waitFor buildRendered
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
|
|
|
@ -6,6 +6,7 @@ minispade.require 'app'
|
|||
waits(50)
|
||||
runs ->
|
||||
Travis.reset()
|
||||
Travis.auth.signOut()
|
||||
url = "/#{url}" unless url.match /^\//
|
||||
Travis.__container__.lookup('router:main').handleURL(url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user