Skip to content

Commit

Permalink
Added Target and User Joined Test
Browse files Browse the repository at this point in the history
  • Loading branch information
dominusmars committed Feb 29, 2024
1 parent 1a544cd commit 0fd7a16
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions test/db.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe("DataBase", () => {
});
});

describe("Add Computer", () => {
it("should add a computer successfully", async () => {
describe("addTarget", () => {
it("should add a target successfully", async () => {
const ip = "192.168.1.1";
const os = "linux";
const hostname = "myhost";
Expand All @@ -18,7 +18,7 @@ describe("DataBase", () => {
assert.ok(result);
});
});
describe("Add User", () => {
describe("addUser", () => {
it("should add a user successfully", async () => {
const ip = "192.168.1.1";
const username = "testuser";
Expand All @@ -42,4 +42,17 @@ describe("DataBase", () => {
assert.ok(!result, "added user to computer that doesnt exist");
});
});
describe("addTargetAndUser", () => {
it("should add a target and user", async () => {
const ip = "192.168.1.3";
const os = "linux";
const hostname = "myhost";
const domain = "example.com";
const username = "username";
const password = "password";
const result = await db.addTargetAndUser(hostname, ip, username, password, os, domain);

assert.ok(result);
});
});
});

0 comments on commit 0fd7a16

Please sign in to comment.