Style user address (with username seperate from host)

This commit is contained in:
2017-12-26 12:03:40 +01:00
parent 0a41be32fd
commit e38e873dd2
7 changed files with 52 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('account-info', 'Integration | Component | account info', {
integration: true
});
test('it splits the user address into username and host', function(assert) {
this.set('userAddress', 'michielbdejong@unhosted.org');
this.render(hbs`{{account-info userAddress=userAddress}}`);
assert.equal(this.$('.username').text().trim(), 'michielbdejong');
assert.equal(this.$('.host').text().trim(), '@unhosted.org');
});