Skip to content

Commit

Permalink
upgrade teaspoon and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jan 14, 2016
1 parent 6c593ef commit 1f46d2f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"scriptjs": "^2.5.8",
"sinon": "^1.17.2",
"style-loader": "^0.12.3",
"teaspoon": "^6.0.0",
"teaspoon": "^6.1.0",
"url-loader": "^0.5.5",
"webpack": "^1.10.5",
"webpack-dev-server": "^1.10.1",
Expand Down
51 changes: 24 additions & 27 deletions test/multiselect.browser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,33 +267,30 @@ describe('Multiselect', function(){
expect(spy.calledOnce).to.equal(true);
})

// it('should show create tag correctly', function(){
// var select = $t(
// <Select
// searchTerm="custom tag"
// onCreate={()=>{}}
// data={dataList}
// onSearch={()=>{}}
// />
// );
//
// // select
// // .render()
// // .tap(s => s
// // .single('.rw-multiselect-create-tag')
// // )
// // .props('searchTerm', undefined)
// // .tap(s => {
// // s
// // .find('.rw-multiselect-create-tag').length
// // .should.equal(0)
// // })
// // .props({searchTerm: 'custom', onCreate: undefined })
// // .tap(s => s
// // .find('.rw-multiselect-create-tag').length
// // .should.equal(0)
// // )
// })
it('should show create tag correctly', function(){
var select = $t(
<Select
searchTerm="custom tag"
onCreate={()=>{}}
data={dataList}
onSearch={()=>{}}
/>
);

select
.render()
.tap(s => s
.single('.rw-multiselect-create-tag')
)
.props('searchTerm', undefined)
.tap(s => s
.none('.rw-multiselect-create-tag')
)
.props({searchTerm: 'custom', onCreate: undefined })
.tap(s => s
.none('.rw-multiselect-create-tag')
)
})

it('should call onCreate', function(){
var create = sinon.spy()
Expand Down

0 comments on commit 1f46d2f

Please sign in to comment.