Skip to content

Commit

Permalink
Fix specs to use boollean, null and empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Nov 15, 2019
1 parent 5c364bd commit a183351
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/javascript/spec/dashboard/widget-empty.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe('widget-empty', () => {
$compile = _$compile_;
const response = {
data: {
content: '',
content: null,
minimized: false,
blank: 'true',
blank: true,
},
status: 200,
statusText: 'OK',
Expand All @@ -38,7 +38,7 @@ describe('widget-empty', () => {
it('is rendered in widget-wrapper if blank is set to true', (done) => {
element = angular.element(`
<form name="angularForm">
<widget-wrapper widget-id="42" widget-buttons="null" widget-type="report"></widget-wrapper>
<widget-wrapper widget-id="42" widget-buttons="[]" widget-type="report"></widget-wrapper>
</form>
`);
element = $compile(element)($scope);
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/spec/dashboard/widget-wrapper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('widget-wrapper', () => {
content: '<div></div>',
minimized: false,
shortcuts: [],
blank: "false",
blank: false,
},
status: 200,
statusText: 'OK',
Expand All @@ -41,7 +41,7 @@ describe('widget-wrapper', () => {
it(`renders widget-${widget} when widget-type is ${widget}`, (done) => {
element = angular.element(`
<form name="angularForm">
<widget-wrapper widget-id="42" widget-blank="false" widget-buttons="null" widget-type="${widget}"></widget-wrapper>
<widget-wrapper widget-id="42" widget-blank="false" widget-buttons="[]" widget-type="${widget}"></widget-wrapper>
</form>
`);
element = $compile(element)($scope);
Expand Down

0 comments on commit a183351

Please sign in to comment.