37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
|
|
(function(g,$) {
|
|
|
|
describe("faderHelpers tests", function() {
|
|
|
|
beforeEach(function() {
|
|
JKTestUtils.loadFixtures('/app/views/clients/_faders.html.erb');
|
|
JKTestUtils.loadFixtures('/spec/javascripts/fixtures/faders.htm');
|
|
});
|
|
|
|
describe("renderVU", function() {
|
|
|
|
describe("with defaults", function() {
|
|
it("should add vertical fader to selector", function() {
|
|
JK.FaderHelpers.renderFader('#fader', {faderId:'a'});
|
|
$fader = $('#fader div[data-control="fader"]');
|
|
orientation = $fader.attr('orientation');
|
|
expect($fader.length).toEqual(1);
|
|
expect(orientation).toEqual('vertical');
|
|
});
|
|
});
|
|
|
|
describe("horizontal", function() {
|
|
it("should add horizontal fader to selector", function() {
|
|
JK.FaderHelpers.renderFader('#fader', {faderId:'a',faderType: "horizontal"});
|
|
$fader = $('#fader div[data-control="fader"]');
|
|
orientation = $fader.attr('orientation');
|
|
expect($fader.length).toEqual(1);
|
|
expect(orientation).toEqual('horizontal');
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})(window, jQuery); |