Skip to content

Commit

Permalink
test(vue): fixes assertions for forbidden cases
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed May 30, 2018
1 parent 42ee540 commit 1ba3cec
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/casl-vue/spec/can.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('`Can` component', () => {
</Can>
`)

expect(wrapper.isEmpty()).to.be.true
expect(wrapper.contains('h1')).to.be.false
})

it('does not render children if `Ability` instance disallows to do an action', () => {
Expand All @@ -54,7 +54,7 @@ describe('`Can` component', () => {
</Can>
`)

expect(wrapper.isEmpty()).to.be.true
expect(wrapper.contains('h1')).to.be.false
})

describe('props validation', () => {
Expand Down Expand Up @@ -87,10 +87,9 @@ describe('`Can` component', () => {
})
})

function render(template, options) {
return mount({ template: `<div>${template}</div>` }, {
localVue: LocalVue,
...options
function render(template) {
return mount({ template: `<div>${template.trim()}</div>` }, {
localVue: LocalVue
})
}
})

0 comments on commit 1ba3cec

Please sign in to comment.