mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
Renamed components
to lib
in the JS project, as Ember has components and they mean something different.
This commit is contained in:
parent
3909f93a7e
commit
9adcd1579d
41 changed files with 15 additions and 10 deletions
20
test/javascripts/lib/key_value_store_test.js
Normal file
20
test/javascripts/lib/key_value_store_test.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
var store = Discourse.KeyValueStore;
|
||||
|
||||
module("Discourse.KeyValueStore", {
|
||||
setup: function() {
|
||||
store.init("test");
|
||||
}
|
||||
});
|
||||
|
||||
test("it's able to get the result back from the store", function() {
|
||||
store.set({ key: "bob", value: "uncle" });
|
||||
equal(store.get("bob"), "uncle");
|
||||
});
|
||||
|
||||
test("is able to nuke the store", function() {
|
||||
store.set({ key: "bob1", value: "uncle" });
|
||||
store.abandonLocal();
|
||||
localStorage.a = 1;
|
||||
equal(store.get("bob1"), void 0);
|
||||
equal(localStorage.a, "1");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue