Skip to content

Commit

Permalink
changed token and fixed viewroomhistory tests
Browse files Browse the repository at this point in the history
it gets in a state where the room is already created, which causes an
exception when we try to create the room.  also there is existing
history there, so now we create new room based on a guid so the room is
always a fresh one 🐑
  • Loading branch information
KyleGobel committed Jan 30, 2015
1 parent b5a0f1e commit 08794a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/IntegrationTests/TestsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public static class TestsConfig
{
public static string AuthToken = "2xv9SIieULT3wxNrmlTU3AtyNtLLFupQFsWFhqry";
public static string AuthToken = "iPqKy5Oyu7DNbZq1lAnMaLvuAUZID4uPVZOl8rfY";
public static int ExistingRoomId = 510675;
}
}
3 changes: 1 addition & 2 deletions src/IntegrationTests/UpdateRoomTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public UpdateRoomTests()
{
HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
_client = new HipchatClient();
var room = _client.CreateRoom("TestUpdateRoom");
_createdRoomId = room.Id;
_createdRoomId = TestHelpers.GetARoomId(_client, "TestUpdateRoom");

var getRoomResponse = _client.GetRoom(_createdRoomId);
_owner = getRoomResponse.Owner;
Expand Down
5 changes: 2 additions & 3 deletions src/IntegrationTests/ViewRoomHistoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public ViewRoomHistoryTests()
HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
_client = new HipchatClient();

var room = _client.CreateRoom(roomName);
_existingRoomId = room.Id;
_existingRoomName = "Test ViewRoomHistory";
_existingRoomName = Guid.NewGuid().ToString("N");
_existingRoomId = TestHelpers.GetARoomId(_client, _existingRoomName);

// Add notifications to history
_client.SendNotification(_existingRoomId, "First entry to history");
Expand Down

0 comments on commit 08794a8

Please sign in to comment.