Add test for get date string function to label model test
This commit is contained in:
parent
91ed38dc5f
commit
2652dabb08
1 changed files with 8 additions and 0 deletions
|
@ -53,6 +53,14 @@ describe("model/label", () => {
|
|||
assert.equal(result, "(min-width: 2560px) 3840px, (min-width: 1920px) 2560px, (min-width: 1280px) 1920px, (min-width: 720px) 1280px, 720px");
|
||||
});
|
||||
|
||||
it("should get date string", () => {
|
||||
const t = "2009-11-17 20:34:58.651387237 +0000 UTC";
|
||||
const values = {ID: 5, LabelName: "Black Cat", LabelSlug: "black-cat", CreatedAt: t};
|
||||
const label = new Label(values);
|
||||
const result = label.getDateString();
|
||||
assert.equal(result, "November 17, 2009 8:34 PM");
|
||||
});
|
||||
|
||||
it("should get model name", () => {
|
||||
const result = Label.getModelName();
|
||||
assert.equal(result, "Label");
|
||||
|
|
Loading…
Reference in a new issue