Telegram Web, preconfigured for usage in I2P.
http://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1003 B
43 lines
1003 B
7 years ago
|
'use strict'
|
||
7 years ago
|
/* global describe, it, inject, expect, beforeEach */
|
||
|
|
||
7 years ago
|
describe('userFirstName filter', function () {
|
||
7 years ago
|
beforeEach(module('myApp.filters'))
|
||
7 years ago
|
|
||
|
beforeEach(inject(function (_$filter_, ___) {
|
||
7 years ago
|
this.$filter = _$filter_
|
||
|
this._ = ___
|
||
7 years ago
|
}))
|
||
7 years ago
|
|
||
|
beforeEach(function () {
|
||
7 years ago
|
this.userFirstNameFilter = this.$filter('userFirstName')
|
||
7 years ago
|
})
|
||
7 years ago
|
|
||
|
it('displays user first name deleted', function () {
|
||
7 years ago
|
var expected = this._('user_first_name_deleted')
|
||
|
var actual = this.userFirstNameFilter(null)
|
||
7 years ago
|
|
||
7 years ago
|
expect(actual).toEqual(expected)
|
||
|
})
|
||
7 years ago
|
|
||
|
it('displays the first name', function () {
|
||
|
var user = {
|
||
|
first_name: 'John'
|
||
7 years ago
|
}
|
||
|
var expected = user.first_name
|
||
7 years ago
|
var actual = this.userFirstNameFilter(user)
|
||
7 years ago
|
|
||
7 years ago
|
expect(actual).toEqual(expected)
|
||
|
})
|
||
7 years ago
|
|
||
|
it('displays the last name alternatively', function () {
|
||
|
var user = {
|
||
|
last_name: 'Doe'
|
||
7 years ago
|
}
|
||
|
var expected = user.last_name
|
||
7 years ago
|
var actual = this.userFirstNameFilter(user)
|
||
7 years ago
|
|
||
7 years ago
|
expect(actual).toEqual(expected)
|
||
|
})
|
||
|
})
|