Remove environment guards (#7741)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-13 13:20:14 -07:00 committed by GitHub
parent d744aa896f
commit a2144faf9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 22 additions and 157 deletions

View file

@ -1,6 +1,6 @@
use crate::{
db::{
tests::{channel_tree, new_test_connection, new_test_user, TEST_RELEASE_CHANNEL},
tests::{channel_tree, new_test_connection, new_test_user},
Channel, ChannelId, ChannelRole, Database, NewUserParams, RoomId,
},
test_both_dbs,
@ -135,12 +135,7 @@ async fn test_joining_channels(db: &Arc<Database>) {
// can join a room with membership to its channel
let (joined_room, _, _) = db
.join_channel(
channel_1,
user_1,
ConnectionId { owner_id, id: 1 },
TEST_RELEASE_CHANNEL,
)
.join_channel(channel_1, user_1, ConnectionId { owner_id, id: 1 })
.await
.unwrap();
assert_eq!(joined_room.room.participants.len(), 1);
@ -149,12 +144,7 @@ async fn test_joining_channels(db: &Arc<Database>) {
drop(joined_room);
// cannot join a room without membership to its channel
assert!(db
.join_room(
room_id,
user_2,
ConnectionId { owner_id, id: 1 },
TEST_RELEASE_CHANNEL
)
.join_room(room_id, user_2, ConnectionId { owner_id, id: 1 },)
.await
.is_err());
}
@ -732,7 +722,7 @@ async fn test_guest_access(db: &Arc<Database>) {
.await
.is_err());
db.join_channel(zed_channel, guest, guest_connection, TEST_RELEASE_CHANNEL)
db.join_channel(zed_channel, guest, guest_connection)
.await
.unwrap();