Skip to content

Instantly share code, notes, and snippets.

@ndelitski
Created November 29, 2017 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndelitski/7ac246df6547748af323216ceecafc44 to your computer and use it in GitHub Desktop.
Save ndelitski/7ac246df6547748af323216ceecafc44 to your computer and use it in GitHub Desktop.
const createCase = (inProps, outProps) => () => {
const initialProps = merge({
hasFoundationRole: false,
status: SECTION_STATUS.needClarification,
finished: true,
permissions: [
SECTION_PERMISSION.readStatus,
SECTION_PERMISSION.sendClarification,
],
}, inProps)
expect(assocStatusLabel(initialProps)).toEqual(merge({
initialProps,
outProps,
})
}
it(`should be "Marked as resolved" for Applicant and if after editing Section has status: ${SECTION_STATUS.needClarification}`,
createCase({
hasFoundationRole: false,
status: SECTION_STATUS.needClarification,
}, {
label: 'Marked as resolved',
})
)
it(`should be "Marked as resolved" for Applicant and if after editing Section has status: ${SECTION_STATUS.needClarification}`,
createCase({
hasFoundationRole: false,
status: SECTION_STATUS.needClarification,
}, {
label: 'Marked as resolved',
})
)
it(`should be "Marked as resolved" for Applicant and if after editing Section has status: ${SECTION_STATUS.needClarification}`,
createCase({
hasFoundationRole: false,
status: SECTION_STATUS.needClarification,
}, {
label: 'Marked as resolved',
})
)
it(`should be "Marked as resolved" for Applicant and if after editing Section has status: ${SECTION_STATUS.needClarification}`, () => {
const initialProps = {
hasFoundationRole: false,
status: SECTION_STATUS.needClarification,
finished: true,
permissions: [
SECTION_PERMISSION.readStatus,
SECTION_PERMISSION.sendClarification,
],
}
expect(assocStatusLabel(initialProps)).toEqual({
...initialProps,
label: 'Marked as resolved',
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment