Browse Source

missed fixing these

pull/113/head
jake 3 years ago
parent
commit
3ceff90f98
  1. 4
      src/login/character.rs
  2. 6
      src/login/login.rs

4
src/login/character.rs

@ -812,7 +812,7 @@ mod test {
#[async_trait::async_trait] #[async_trait::async_trait]
impl EntityGateway for TestData { impl EntityGateway for TestData {
async fn get_user_settings_by_user(&self, user: &UserAccountEntity) -> Result<UserSettingsEntity, GatewayError> {
async fn get_user_settings_by_user(&mut self, user: &UserAccountEntity) -> Result<UserSettingsEntity, GatewayError> {
Ok(UserSettingsEntity { Ok(UserSettingsEntity {
id: UserSettingsId(0), id: UserSettingsId(0),
user_id: user.id, user_id: user.id,
@ -868,7 +868,7 @@ mod test {
#[async_std::test] #[async_std::test]
async fn test_character_create() { async fn test_character_create() {
let test_data = InMemoryGateway::default();
let mut test_data = InMemoryGateway::default();
let mut fake_user = ClientState::new(); let mut fake_user = ClientState::new();
fake_user.user = Some(UserAccountEntity { fake_user.user = Some(UserAccountEntity {
id: UserAccountId(3), id: UserAccountId(3),

6
src/login/login.rs

@ -211,7 +211,7 @@ mod test {
#[async_trait::async_trait] #[async_trait::async_trait]
impl EntityGateway for TestData { impl EntityGateway for TestData {
async fn get_user_by_name(&self, name: String) -> Result<UserAccountEntity, GatewayError> {
async fn get_user_by_name(&mut self, name: String) -> Result<UserAccountEntity, GatewayError> {
assert!(name == "testuser"); assert!(name == "testuser");
Ok(UserAccountEntity { Ok(UserAccountEntity {
id: UserAccountId(1), id: UserAccountId(1),
@ -269,7 +269,7 @@ mod test {
#[async_trait::async_trait] #[async_trait::async_trait]
impl EntityGateway for TestData { impl EntityGateway for TestData {
async fn get_user_by_name(&self, _name: String) -> Result<UserAccountEntity, GatewayError> {
async fn get_user_by_name(&mut self, _name: String) -> Result<UserAccountEntity, GatewayError> {
Err(GatewayError::Error) Err(GatewayError::Error)
} }
} }
@ -303,7 +303,7 @@ mod test {
#[async_trait::async_trait] #[async_trait::async_trait]
impl EntityGateway for TestData { impl EntityGateway for TestData {
async fn get_user_by_name(&self, name: String) -> Result<UserAccountEntity, GatewayError> {
async fn get_user_by_name(&mut self, name: String) -> Result<UserAccountEntity, GatewayError> {
assert!(name == "testuser"); assert!(name == "testuser");
Ok(UserAccountEntity { Ok(UserAccountEntity {
id: UserAccountId(1), id: UserAccountId(1),

Loading…
Cancel
Save