diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 69967be..9b39ddf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,13 +22,13 @@ jobs: sudo apt-get install -y git python3 build-essential curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y nodejs - git clone https://github.com/polyphony-chat/spacebarchat-server.git - - name: Prepare and start spacebarchat-server + git clone https://github.com/bitfl0wer/server.git + - name: Prepare and start Spacebar server run: | npm install npm run setup npm run start & - working-directory: ./spacebarchat-server + working-directory: ./server - name: Build run: cargo build --verbose - name: Run tests diff --git a/src/api/channels/messages.rs b/src/api/channels/messages.rs index 0b73945..d05f640 100644 --- a/src/api/channels/messages.rs +++ b/src/api/channels/messages.rs @@ -127,10 +127,10 @@ mod test { #[tokio::test] async fn send_message() { - let channel_id = "1104413094102290492".to_string(); + let channel_id = "1106954414356168802".to_string(); let mut message = crate::api::schemas::MessageSendSchema::new( None, - Some("ashjkdhjksdfgjsdfzjkhsdvhjksdf".to_string()), + Some("A Message!".to_string()), None, None, None, @@ -151,8 +151,8 @@ mod test { .await .unwrap(); let login_schema: LoginSchema = LoginSchema::new( - AuthUsername::new("user1@gmail.com".to_string()).unwrap(), - "user".to_string(), + AuthUsername::new("user@test.xyz".to_string()).unwrap(), + "transrights".to_string(), None, None, None, @@ -173,9 +173,9 @@ mod test { #[tokio::test] async fn send_message_attachment() { - let channel_id = "1104413094102290492".to_string(); + let channel_id = "1106954414356168802".to_string(); - let f = File::open("/drive/hdd1/Pictures/polyphony-chorus8bit.png").unwrap(); + let f = File::open("./README.md").unwrap(); let mut reader = BufReader::new(f); let mut buffer = Vec::new(); @@ -183,7 +183,7 @@ mod test { let attachment = crate::api::types::PartialDiscordFileAttachment { id: None, - filename: "test.png".to_string(), + filename: "README.md".to_string(), description: None, content_type: None, size: None, @@ -220,8 +220,8 @@ mod test { .await .unwrap(); let login_schema: LoginSchema = LoginSchema::new( - AuthUsername::new("user1@gmail.com".to_string()).unwrap(), - "user".to_string(), + AuthUsername::new("user@test.xyz".to_string()).unwrap(), + "transrights".to_string(), None, None, None, diff --git a/src/api/types.rs b/src/api/types.rs index fc55061..e138eec 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -51,7 +51,7 @@ pub struct UserSettings { stream_notifications_enabled: bool, theme: String, timezone_offset: i32, - view_nsfw_guilds: bool, + //view_nsfw_guilds: bool, } #[derive(Debug, Serialize, Deserialize)]