add more specs

This commit is contained in:
Dan Hansen 2011-01-29 16:45:03 -06:00
parent 7417dc5923
commit 55bee713e9

View file

@ -36,6 +36,13 @@ describe("Diaspora", function() {
expect(Diaspora.widgets.i18n.t("yo.hi.sup.test")).toEqual("test"); expect(Diaspora.widgets.i18n.t("yo.hi.sup.test")).toEqual("test");
expect(Diaspora.widgets.i18n.t("more.another")).toEqual("i hope this spec is green"); expect(Diaspora.widgets.i18n.t("more.another")).toEqual("i hope this spec is green");
}); });
it("can render a mustache template", function() {
Diaspora.widgets.i18n.loadLocale({yo: "{{yo}}"}, "en");
expect(Diaspora.widgets.i18n.t("yo", {yo: "it works!"})).toEqual("it works!");
});
it("returns an empty string if the translation is not found", function() {
expect(Diaspora.widgets.i18n.t("thisstringdoesnotexist")).toEqual("");
});
}); });
}); });
}); });