|
|
|
|
@ -346,6 +346,7 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '1', name: 'abc'}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '2', name: 'def'}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '3', name: 'abd', userAssignable: false}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '4', name: 'Deg'}),
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
afterEach(function() {
|
|
|
|
|
@ -377,6 +378,32 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
it('completes case insensitive', function() {
|
|
|
|
|
var callback = sinon.stub();
|
|
|
|
|
opts.query({
|
|
|
|
|
term: 'de',
|
|
|
|
|
callback: callback
|
|
|
|
|
});
|
|
|
|
|
expect(fetchStub.calledOnce).toEqual(true);
|
|
|
|
|
|
|
|
|
|
fetchStub.yieldTo('success', view.collection);
|
|
|
|
|
|
|
|
|
|
expect(callback.calledOnce).toEqual(true);
|
|
|
|
|
expect(callback.getCall(0).args[0].results).toEqual([
|
|
|
|
|
{
|
|
|
|
|
id: '2',
|
|
|
|
|
name: 'def',
|
|
|
|
|
userVisible: true,
|
|
|
|
|
userAssignable: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: '4',
|
|
|
|
|
name: 'Deg',
|
|
|
|
|
userVisible: true,
|
|
|
|
|
userAssignable: true
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -446,6 +473,7 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '1', name: 'abc'}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '2', name: 'def'}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '3', name: 'abd', userAssignable: false}),
|
|
|
|
|
new OC.SystemTags.SystemTagModel({id: '4', name: 'Deg'}),
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
afterEach(function() {
|
|
|
|
|
@ -471,6 +499,32 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
it('completes case insensitive', function() {
|
|
|
|
|
var callback = sinon.stub();
|
|
|
|
|
opts.query({
|
|
|
|
|
term: 'de',
|
|
|
|
|
callback: callback
|
|
|
|
|
});
|
|
|
|
|
expect(fetchStub.calledOnce).toEqual(true);
|
|
|
|
|
|
|
|
|
|
fetchStub.yieldTo('success', view.collection);
|
|
|
|
|
|
|
|
|
|
expect(callback.calledOnce).toEqual(true);
|
|
|
|
|
expect(callback.getCall(0).args[0].results).toEqual([
|
|
|
|
|
{
|
|
|
|
|
id: '2',
|
|
|
|
|
name: 'def',
|
|
|
|
|
userVisible: true,
|
|
|
|
|
userAssignable: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: '4',
|
|
|
|
|
name: 'Deg',
|
|
|
|
|
userVisible: true,
|
|
|
|
|
userAssignable: true
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|