diff --git a/app/components/submissions-award-cell/index.hbs b/app/components/submissions-award-cell/index.hbs
index 29d70128..0ad4de66 100644
--- a/app/components/submissions-award-cell/index.hbs
+++ b/app/components/submissions-award-cell/index.hbs
@@ -1,5 +1,7 @@
{{#each @record.grants as |grant index|}}
- {{if index ",
"}}
+ {{#if index}}
+ ,
+ {{/if}}
{{grant.awardNumber}}
({{grant.primaryFunder.name}})
{{else}}
diff --git a/tests/integration/components/submissions-award-cell-test.js b/tests/integration/components/submissions-award-cell-test.js
index f2dcda47..b6f5e95f 100644
--- a/tests/integration/components/submissions-award-cell-test.js
+++ b/tests/integration/components/submissions-award-cell-test.js
@@ -7,8 +7,31 @@ module('Integration | Component | submissions award cell', (hooks) => {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
- await render(hbs``);
+ const record = {
+ grants: [
+ {
+ id: 'test-id-1',
+ detail: 'test-detail-1',
+ awardNumber: 'test-awdnum-1',
+ primaryFunder: { name: 'test-pfname-1' },
+ },
+ {
+ id: 'test-id-2',
+ detail: 'test-detail-2',
+ awardNumber: 'test-awdnum-2',
+ primaryFunder: { name: 'test-pfname-2' },
+ },
+ ],
+ };
+ this.set('record', record);
+
+ await render(hbs``);
assert.ok(true);
+ assert.equal(
+ this.element.textContent.trim(),
+ 'test-awdnum-1\n (test-pfname-1)\n ,\n test-awdnum-2\n (test-pfname-2)',
+ 'render many awards correctly'
+ );
});
});