Render currencies etc.

This commit is contained in:
2020-07-09 17:07:05 +02:00
parent eaac245f4e
commit 4849a755dc
6 changed files with 51 additions and 11 deletions
@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Helper | sats-to-btc', function(hooks) {
setupRenderingTest(hooks);
test('it converts satoshis to full BTC amounts', async function(assert) {
this.set('amount', '166800');
await render(hbs`{{sats-to-btc this.amount}}`);
assert.equal(this.element.textContent.trim(), '0.001668');
});
});