Skip to content

Instantly share code, notes, and snippets.

@realyze
Created July 17, 2013 22:13
Show Gist options
  • Save realyze/6025023 to your computer and use it in GitHub Desktop.
Save realyze/6025023 to your computer and use it in GitHub Desktop.
# coffeelint: disable=max_line_length
describe 'auth', () ->
authService = null
$cookieStore = null
angular.module('cookieStoreMock', [])
.factory '$cookieStore', -> {get: -> 'name'}
beforeEach ->
module 'auth'
module 'cookieStoreMock'
inject ($injector) ->
$cookieStore = $injector.get('$cookieStore')
console.log 'cookie store mock', $cookieStore
authService = $injector.get 'auth'
console.log 'auth service mock', authService
it "should get the current user data from the 'user' cookie", ->
expect(authService.currentUser).toEqual(null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment