Need to add $httpBackend

pull/91/head^2
Rick Carlino 2014-07-02 07:04:39 -07:00
parent 3ebf54f73c
commit ad406354d8
4 changed files with 33 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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