-
Notifications
You must be signed in to change notification settings - Fork 26
Leaves - Dianna, Sabrina, and Tiffany #4
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
base: master
Are you sure you want to change the base?
Conversation
…elper methods to workspace.rb
| /specs/cassettes/ | ||
|
|
||
| # Ignore slack token verification | ||
| slack_token_verification_test.rb |
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.
Good on you to have this test!
|
|
||
| PUMPKIN_SPICE = SlackCLI::Workspace.new() | ||
|
|
||
| MAIN_MENU = ["List Users", "List Channels", "Select User", "Select Channel", "Details", "Send Message", "Get Message History", "Change Bot Settings", "Quit"] |
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.
Good use of a global constant.
| im_query = { token: ENV["SLACK_API_TOKEN"]} | ||
| im_response = HTTParty.get(im_url, query: im_query) | ||
|
|
||
| unless im_response.code == 200 && im_response.parsed_response["ok"] |
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.
Good use of a custom exception. Consider using a begin/rescue in your CLI so that it doesn't break when this happens.
| query = { token: ENV["SLACK_API_TOKEN"] } | ||
| response = HTTParty.get(url, query: query) | ||
|
|
||
| unless response.code == 200 && response.parsed_response["ok"] |
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.
Nice work adding this exception raising here.
| end | ||
| end | ||
|
|
||
| describe "send_message method" do |
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.
Good work testing for positive and negative results.
slack.rbWhat We're Looking For
|
slack.rb
Congratulations! You're submitting your assignment!
You and your partner should collaborate on the answers to these questions.
Comprehension Questions