mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Palette creator can save palettes to local storage
This commit is contained in:
23
test/js/model/PaletteTest.js
Normal file
23
test/js/model/PaletteTest.js
Normal file
@ -0,0 +1,23 @@
|
||||
describe("Palette", function() {
|
||||
|
||||
beforeEach(function() {});
|
||||
afterEach(function() {});
|
||||
|
||||
it("moves colors correctly", function() {
|
||||
// when
|
||||
var colors = [
|
||||
'#000000',
|
||||
'#111111',
|
||||
'#222222'
|
||||
];
|
||||
var palette = new pskl.model.Palette('id', 'name', colors);
|
||||
|
||||
// then
|
||||
palette.move(2,0);
|
||||
|
||||
// verify
|
||||
expect(palette.get(0)).toBe('#222222');
|
||||
expect(palette.get(1)).toBe('#000000');
|
||||
expect(palette.get(2)).toBe('#111111');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user