-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from ifonya105/auth_feature
Auth feature
- Loading branch information
Showing
6 changed files
with
82 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System.Linq; | ||
using SlackAPI.RPCMessages; | ||
using SlackAPI.Tests.Configuration; | ||
using SlackAPI.Tests.Helpers; | ||
using Xunit; | ||
|
||
namespace SlackAPI.Tests | ||
{ | ||
[Collection("Integration tests")] | ||
public class Conversations | ||
{ | ||
private readonly IntegrationFixture fixture; | ||
|
||
public Conversations(IntegrationFixture fixture) | ||
{ | ||
this.fixture = fixture; | ||
} | ||
[Fact] | ||
public void ConversationList() | ||
{ | ||
var client = this.fixture.UserClient; | ||
ConversationsListResponse actual = null; | ||
using (var sync = new InSync(nameof(SlackClient.ChannelLookup))) | ||
{ | ||
client.GetConversationsList(response => | ||
{ | ||
actual = response; | ||
sync.Proceed(); | ||
}); | ||
} | ||
|
||
Assert.True(actual.ok, "Error while fetching conversation list."); | ||
Assert.True(actual.channels.Any()); | ||
|
||
// check to null | ||
var someChannel = actual.channels.First(); | ||
Assert.NotNull(someChannel.id); | ||
Assert.NotNull(someChannel.name); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters