mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Set up notification store for integration tests
This commit is contained in:
parent
1e1256dbdd
commit
fed3ffb681
4 changed files with 8 additions and 5 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1502,6 +1502,7 @@ dependencies = [
|
||||||
"lsp",
|
"lsp",
|
||||||
"nanoid",
|
"nanoid",
|
||||||
"node_runtime",
|
"node_runtime",
|
||||||
|
"notifications",
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
|
|
|
@ -73,6 +73,7 @@ git = { path = "../git", features = ["test-support"] }
|
||||||
live_kit_client = { path = "../live_kit_client", features = ["test-support"] }
|
live_kit_client = { path = "../live_kit_client", features = ["test-support"] }
|
||||||
lsp = { path = "../lsp", features = ["test-support"] }
|
lsp = { path = "../lsp", features = ["test-support"] }
|
||||||
node_runtime = { path = "../node_runtime" }
|
node_runtime = { path = "../node_runtime" }
|
||||||
|
notifications = { path = "../notifications", features = ["test-support"] }
|
||||||
project = { path = "../project", features = ["test-support"] }
|
project = { path = "../project", features = ["test-support"] }
|
||||||
rpc = { path = "../rpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
settings = { path = "../settings", features = ["test-support"] }
|
settings = { path = "../settings", features = ["test-support"] }
|
||||||
|
|
|
@ -192,7 +192,7 @@ CREATE INDEX "index_followers_on_room_id" ON "followers" ("room_id");
|
||||||
CREATE TABLE "channels" (
|
CREATE TABLE "channels" (
|
||||||
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
"name" VARCHAR NOT NULL,
|
"name" VARCHAR NOT NULL,
|
||||||
"created_at" TIMESTAMP NOT NULL DEFAULT now
|
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "channel_chat_participants" (
|
CREATE TABLE IF NOT EXISTS "channel_chat_participants" (
|
||||||
|
@ -315,15 +315,15 @@ CREATE UNIQUE INDEX "index_observed_channel_messages_user_and_channel_id" ON "ob
|
||||||
|
|
||||||
CREATE TABLE "notification_kinds" (
|
CREATE TABLE "notification_kinds" (
|
||||||
"id" INTEGER PRIMARY KEY NOT NULL,
|
"id" INTEGER PRIMARY KEY NOT NULL,
|
||||||
"name" VARCHAR NOT NULL,
|
"name" VARCHAR NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE UNIQUE INDEX "index_notification_kinds_on_name" ON "notification_kinds" ("name");
|
CREATE UNIQUE INDEX "index_notification_kinds_on_name" ON "notification_kinds" ("name");
|
||||||
|
|
||||||
CREATE TABLE "notifications" (
|
CREATE TABLE "notifications" (
|
||||||
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
"created_at" TIMESTAMP NOT NULL default now,
|
"created_at" TIMESTAMP NOT NULL default CURRENT_TIMESTAMP,
|
||||||
"recipent_id" INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
"recipient_id" INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
||||||
"kind" INTEGER NOT NULL REFERENCES notification_kinds (id),
|
"kind" INTEGER NOT NULL REFERENCES notification_kinds (id),
|
||||||
"is_read" BOOLEAN NOT NULL DEFAULT FALSE,
|
"is_read" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
"entity_id_1" INTEGER,
|
"entity_id_1" INTEGER,
|
||||||
|
|
|
@ -231,7 +231,8 @@ impl TestServer {
|
||||||
workspace::init(app_state.clone(), cx);
|
workspace::init(app_state.clone(), cx);
|
||||||
audio::init((), cx);
|
audio::init((), cx);
|
||||||
call::init(client.clone(), user_store.clone(), cx);
|
call::init(client.clone(), user_store.clone(), cx);
|
||||||
channel::init(&client, user_store, cx);
|
channel::init(&client, user_store.clone(), cx);
|
||||||
|
notifications::init(client.clone(), user_store, cx);
|
||||||
});
|
});
|
||||||
|
|
||||||
client
|
client
|
||||||
|
|
Loading…
Reference in a new issue