-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth feature #270
Merged
Merged
Auth feature #270
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
899dcf9
fixed auth with token
b443448
added conversation list test
ffb101a
added is_im property
bbff335
added user property to channel
9ba99ae
fixed upload file method
092bbf6
fixed UserUIInteraction test
ca6d883
Merge branch 'master' into auth_feature
00b0d8d
fix channel members
bebd500
fix UserUIIntercation test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this is the part I take issue with. We have a split client for handling async workflows specifically.
Calling
.Result
does not work as a way to invoke async from a sync callThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I'm realizing we did do
.Result
before. Ugh.