mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
add label filter test
This commit is contained in:
parent
53d58303ef
commit
dd55ff48b7
1 changed files with 42 additions and 0 deletions
42
test/unit/specs/filters/label.js
Normal file
42
test/unit/specs/filters/label.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
define(function (require) {
|
||||
var angular = require('angular');
|
||||
var _ = require('lodash');
|
||||
var faker = require('faker');
|
||||
|
||||
// Load the kibana app dependencies.
|
||||
require('angular-route');
|
||||
|
||||
// Load kibana and its applications
|
||||
require('apps/discover/index');
|
||||
|
||||
var filter;
|
||||
|
||||
var init = function (expandable) {
|
||||
// Load the application
|
||||
module('kibana');
|
||||
|
||||
// Create the scope
|
||||
inject(function ($filter) {
|
||||
filter = $filter('label');
|
||||
});
|
||||
};
|
||||
|
||||
describe('label filter', function () {
|
||||
beforeEach(function () {
|
||||
init();
|
||||
});
|
||||
|
||||
it('should have a label filter', function () {
|
||||
expect(filter).to.not.be(null);
|
||||
});
|
||||
|
||||
it('should capitalize the first letter in a string', function () {
|
||||
expect(filter('something')).to.be('Something');
|
||||
});
|
||||
|
||||
it('should capitalize the first letter in every word', function () {
|
||||
expect(filter('foo bar fizz buzz')).to.be('Foo Bar Fizz Buzz');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue