diff options
author | Ruben Davila <rdavila84@gmail.com> | 2017-01-18 19:48:16 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2017-01-18 19:48:16 +0300 |
commit | 0f3c9355c1b57a56b4027df4deb78a2520596b15 (patch) | |
tree | 2b97df455017aa1c0c347b5f6d7255c295d9af67 /spec/services/slash_commands | |
parent | 63b36241945a7f9bb280f360b3b269de8c5be8f6 (diff) |
Add some API endpoints for time tracking.
New endpoints are:
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time"
GET :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
Diffstat (limited to 'spec/services/slash_commands')
-rw-r--r-- | spec/services/slash_commands/interpret_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/slash_commands/interpret_service_spec.rb b/spec/services/slash_commands/interpret_service_spec.rb index e1358acd7c1..80ae285ef64 100644 --- a/spec/services/slash_commands/interpret_service_spec.rb +++ b/spec/services/slash_commands/interpret_service_spec.rb @@ -222,7 +222,7 @@ describe SlashCommands::InterpretService, services: true do it 'populates spend_time: 3600 if content contains /spend 1h' do _, updates = service.execute(content, issuable) - expect(updates).to eq(spend_time: 3600) + expect(updates).to eq(spend_time: { duration: 3600, user: developer }) end end @@ -230,7 +230,7 @@ describe SlashCommands::InterpretService, services: true do it 'populates spend_time: -1800 if content contains /spend -30m' do _, updates = service.execute(content, issuable) - expect(updates).to eq(spend_time: -1800) + expect(updates).to eq(spend_time: { duration: -1800, user: developer }) end end @@ -246,7 +246,7 @@ describe SlashCommands::InterpretService, services: true do it 'populates spend_time: :reset if content contains /remove_time_spent' do _, updates = service.execute(content, issuable) - expect(updates).to eq(spend_time: :reset) + expect(updates).to eq(spend_time: { duration: :reset, user: developer }) end end |