travis-web/tests/unit/components/travis-status-test.coffee
Piotr Sarnacki 9d46fc6712 Add footer to landing page and main layout
This commit also plugs statuspage.io status check to the footer's status
section.
2015-03-31 14:20:30 +02:00

20 lines
627 B
CoffeeScript

`import { test, moduleForComponent } from 'ember-qunit'`
server = null
moduleForComponent 'travis-status', 'TravisStatusComponent', {}
test 'adds incident class to .status-circle', ->
expect 3
# creates the component instance
component = @subject()
component.getStatus = ->
new Ember.RSVP.Promise (resolve, reject) ->
resolve({ status: { indicator: 'major' } })
ok !component.get('status'), 'status is initially not set'
@append()
equal component.get('status'), 'major', 'status is updated from the API'
ok component.$('.status-circle').hasClass('major'), 'status class is set on .status-circle'