Skip to content

Commit

Permalink
Update tests data
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsAnd committed Jun 10, 2020
1 parent 7a96ade commit cf1075a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/lib/get-template-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const templates = require('../../templates/avtaler.json')

const expectedData = {
file: 'elevpc.docx',
name: 'Avtale om leie-PC fra Telemark fylkeskommune',
name: 'Avtale om leie-PC fra Vestfold og Telemark fylkeskommune',
dueDays: 150,
dueDate: false,
expireDate: false,
Expand All @@ -20,7 +20,7 @@ const expectedData = {
Paragraph: 'Offl. § 13 jf. fvl. § 13 (1) nr.1',
NoarkClassificationCode: 'B31',
Status: 'J',
Title: 'Avtale om leie-PC fra Telemark fylkeskommune'
Title: 'Avtale om leie-PC fra Vestfold og Telemark fylkeskommune'
},
distribution: {
kunDigitalLevering: true,
Expand Down Expand Up @@ -72,12 +72,10 @@ test('Requires input - options.templateId', t => {

test('Throws if domain does not exist', t => {
const error = t.throws(() => getTemplate({ domain: 'finnes-ikke', templateId: 'finnes-ikke' }))

t.is(error.message, 'Cannot find module \'./templates/finnes-ikke.json\'')
t.true(error.message.toString().startsWith('Cannot find module \'./templates/finnes-ikke.json\''))
})

test('Throws if template does not exist', t => {
const error = t.throws(() => getTemplate({ domain: 'avtaler', templateId: 'finnes-ikke' }))

t.is(error.message, 'Template not found')
})

0 comments on commit cf1075a

Please sign in to comment.