'use strict';

describe('Service: Uistates', function () {

  // load the service's module
  beforeEach(module('sumaAnalysis'));

  // instantiate service
  var Uistates,
      Rootscope;
  beforeEach(inject(function (_uiStates_, _$rootScope_) {
    Uistates = _uiStates_;
    Rootscope = _$rootScope_;
  }));

  it('should update state', function () {
    Uistates.setUIState('initial', Rootscope);
    expect(Rootscope.state).to.equal(undefined);
  });

});

@@ -181,16 +181,17 @@
 tscope;%0A
+%0A
   before
@@ -329,123 +329,1186 @@
 ate 
-state', function () %7B%0A    Uistates.setUIState('initial', Rootscope);%0A    expect(Rootscope.state).to.equal(undefined
+initial to true', function () %7B%0A    Uistates.setUIState('initial', Rootscope);%0A    expect(Rootscope%5B'initial'%5D).to.equal(true);%0A    expect(Rootscope%5B'loading'%5D).to.equal(false);%0A    expect(Rootscope%5B'success'%5D).to.equal(false);%0A    expect(Rootscope%5B'error'%5D).to.equal(false);%0A  %7D);%0A%0A  it('should update loading to true', function () %7B%0A    Uistates.setUIState('loading', Rootscope);%0A    expect(Rootscope%5B'initial'%5D).to.equal(false);%0A    expect(Rootscope%5B'loading'%5D).to.equal(true);%0A    expect(Rootscope%5B'success'%5D).to.equal(false);%0A    expect(Rootscope%5B'error'%5D).to.equal(false);%0A  %7D);%0A%0A  it('should update success to true', function () %7B%0A    Uistates.setUIState('success', Rootscope);%0A    expect(Rootscope%5B'initial'%5D).to.equal(false);%0A    expect(Rootscope%5B'loading'%5D).to.equal(false);%0A    expect(Rootscope%5B'success'%5D).to.equal(true);%0A    expect(Rootscope%5B'error'%5D).to.equal(false);%0A  %7D);%0A%0A  it('should update error to true', function () %7B%0A    Uistates.setUIState('error', Rootscope);%0A    expect(Rootscope%5B'initial'%5D).to.equal(false);%0A    expect(Rootscope%5B'loading'%5D).to.equal(false);%0A    expect(Rootscope%5B'success'%5D).to.equal(false);%0A    expect(Rootscope%5B'error'%5D).to.equal(true
 );%0A 

update uiStates test