Need to add $httpBackend
parent
3ebf54f73c
commit
ad406354d8
|
@ -1,15 +1,11 @@
|
|||
#= require application
|
||||
#= require angular/angular-mock
|
||||
|
||||
describe "Restauranteur controllers", ->
|
||||
describe "MovementController", ->
|
||||
beforeEach ->
|
||||
module("FarmBot")
|
||||
inject ($controller) ->
|
||||
@scope = {}
|
||||
@ctrl = $controller("MovementController", $scope: scope)
|
||||
|
||||
describe "MovementController", ->
|
||||
it "initializes X, Y and Z", ->
|
||||
expect(scope.x).toBe(0)
|
||||
expect(scope.y).toBe(0)
|
||||
expect(scope.z).toBe(0)
|
||||
it "initializes X, Y and Z", ->
|
||||
expect(scope.x).toBe(0)
|
||||
expect(scope.y).toBe(0)
|
||||
expect(scope.z).toBe(0)
|
|
@ -0,0 +1,5 @@
|
|||
# This file includes the main application.
|
||||
# It, in turn, is included by the tests.
|
||||
# Prevents us having to include application files on every spec.
|
||||
#= require application
|
||||
#= require angular/angular-mock
|
|
@ -0,0 +1,11 @@
|
|||
describe "MovementController", ->
|
||||
beforeEach ->
|
||||
module("FarmBot")
|
||||
inject ($controller) ->
|
||||
@scope = {}
|
||||
@ctrl = $controller("MovementController", $scope: scope)
|
||||
|
||||
it "initializes X, Y and Z", ->
|
||||
expect(scope.x).toBe(0)
|
||||
expect(scope.y).toBe(0)
|
||||
expect(scope.z).toBe(0)
|
|
@ -0,0 +1,12 @@
|
|||
describe "SettingsController", ->
|
||||
beforeEach ->
|
||||
module("FarmBot")
|
||||
inject ($controller) ->
|
||||
@scope = {}
|
||||
@ctrl = $controller("SettingsController", $scope: scope)
|
||||
|
||||
it "initializes an empty default device", ->
|
||||
expect(scope.device).toEqual({})
|
||||
|
||||
it "has a list of user created devices", ->
|
||||
expect(scope.devices).toBeDefined()
|
Loading…
Reference in New Issue