1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00
OpenSTF/res/app/components/stf/common-ui/clear-button/clear-button-spec.js
2016-01-19 23:08:33 +09:00

22 lines
578 B
JavaScript

describe('clearButton', function() {
beforeEach(angular.mock.module(require('./').name))
var scope, compile
beforeEach(inject(function($rootScope, $compile) {
scope = $rootScope.$new()
compile = $compile
}))
it('should display a text label', function() {
var element = compile('<clear-button />')(scope)
expect(element.find('span').text()).toBe('Clear')
})
it('should display a trash icon', function() {
var element = compile('<clear-button />')(scope)
expect(element.find('i')[0].getAttribute('class')).toMatch('fa-trash-o')
})
})