Skip to content

Commit

Permalink
Fix device tests concurrency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed May 13, 2022
1 parent 77bed64 commit f490325
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Mailosaur.Test/DevicesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ public void CrudTest()
OtpResult otpResult = m_Client.Devices.Otp(createdDevice.Id);
Assert.Equal(6, otpResult.Code.Length);

Assert.Equal(1, m_Client.Devices.List().Items.Count());
var before = m_Client.Devices.List();
Assert.True(before.Items.Any(x => x.Id == createdDevice.Id));

m_Client.Devices.Delete(createdDevice.Id);
Assert.Equal(0, m_Client.Devices.List().Items.Count());

var after = m_Client.Devices.List();
Assert.False(after.Items.Any(x => x.Id == createdDevice.Id));
}

[Fact]
Expand Down

0 comments on commit f490325

Please sign in to comment.