One feature-level test (Capybara) to confirm the following behavior:
Any other classes/methods that are introduced in order to complete the above feature should have unit tests.
An unfinished WIP version of this feature exists at https://github.com/18F/dolores-landingham-bot/pull/162/files -- feel free to use any/all of that code to get started.
We already have a method that retrieves all slack users in the org for the bot user: https://github.com/18F/dolores-landingham-bot/blob/master/app/services/slack_api_wrapper.rb#L23. API docs for endpoint are at https://api.slack.com/methods/users.list
Slack usernames change but Slack IDs do not, so IDs can be used to see if a username was changed.
This will require removing the validation on started_on since that information is not available via the Slack API.
We are already using Clockwork to run cron jobs. Adding this job to the existing clock config is probably the best way to run this daily task: https://github.com/18F/dolores-landingham-bot/blob/master/config/clock.rb
|Christian G. Warden||080033077||$1,493.00||July 13, 2016 12:28:02 PM EDT|
|Summers, Dane||080194337||$1,450.00||July 13, 2016 10:25:56 AM EDT|
|Mile Two||079913221||$790.00||July 13, 2016 09:50:47 AM EDT|
|WeLike, LLC||827386942||$1,000.00||July 12, 2016 02:04:42 PM EDT|
|Mila Frerichs||313210696||$880.00||July 12, 2016 03:23:57 AM EDT|
|Evan Rose||07-944-1444||$1,250.00||July 11, 2016 03:06:10 PM EDT|
|Dan Malks||079977978||$1,250.00||July 11, 2016 02:46:32 PM EDT|
|Geoff Harcourt||148361251||$490.00 *||July 11, 2016 01:02:52 PM EDT|
* - winning bid
Bidding for this auction closed on July 13, 2016 01:00:00 PM EDT.
July 11, 2016 01:00:00 PM EDT
July 13, 2016 01:00:00 PM EDT
July 20, 2016 01:00:00 PM EDT
Sealed bid (rules)
July 29, 2016 01:37:59 PM EDT
July 21, 2016 09:33:37 AM EDT