Sign out user before running tests

This commit is contained in:
Piotr Sarnacki 2013-04-29 23:00:13 +02:00
parent f3570acf7c
commit e23d16c135
3 changed files with 5 additions and 6 deletions

View File

@ -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')

View File

@ -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', ->

View File

@ -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)