Add contributor list design and wiring

This commit is contained in:
2017-01-31 13:28:57 +08:00
parent 22e9a2ad97
commit 4dbeded613
10 changed files with 147 additions and 17 deletions
@@ -0,0 +1,16 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('contributor-list', 'Integration | Component | contributor list', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.on('myAction', function(val) { ... });
this.render(hbs`{{contributor-list}}`);
assert.equal(this.$().text().trim(), '');
});
+9
View File
@@ -0,0 +1,9 @@
import { moduleFor, test } from 'ember-qunit';
moduleFor('model:contributor', 'Unit | Model | contributor');
test('avatarURL returns correct URL', function(assert) {
let model = this.subject();
model.set('github_uid', '318');
assert.equal(model.get('avatarURL'), 'https://avatars2.githubusercontent.com/u/318?v=3&s=128');
});