Permalink
Browse files

fix broken tests

1 parent d7c375e commit 2822e2bf5236522de703c879e175d6045ec69edb @cntoplolicon cntoplolicon committed May 28, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/spec/multiSelectSpec.js
@@ -316,7 +316,7 @@ describe("multiSelect", function() {
$('#multi-select').multiSelect();
clickedItem = $('.ms-selection ul.ms-list li').first();
- value = clickedItem.attr('id').replace('-selection', '');
+ value = clickedItem.data('ms-value');
correspondingSelectableItem = $('.ms-selection ul.ms-list li').first();
spyOnEvent(select, 'change');
spyOnEvent(select, 'focus');
@@ -328,7 +328,7 @@ describe("multiSelect", function() {
});
it('should show associated selectable item', function(){
- expect($('#'+value+'-selectable')).toBe(':visible');
+ expect($('#'+sanitize(value)+'-selectable')).toBe(':visible');
});
it('should remove the .ms-selected class to the corresponding selectable item', function(){
@@ -357,7 +357,7 @@ describe("multiSelect", function() {
$('#multi-select').multiSelect();
clickedItem = $('.ms-selection ul.ms-list li').first();
- value = clickedItem.attr('id').replace('-selection', '');
+ value = clickedItem.data('ms-value');
correspondingSelectableItem = $('.ms-selection ul.ms-list li').first();
spyOnEvent(select, 'change');
spyOnEvent(select, 'focus');
@@ -389,4 +389,4 @@ describe("multiSelect", function() {
});
});
});
-});
+});

0 comments on commit 2822e2b

Please sign in to comment.