diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-01-18 15:49:22 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-01-18 15:49:22 +0000 |
commit | f208897ccbdb539eb16a72d32cce68881eaffca7 (patch) | |
tree | 1b731e73ac9bc08757c29f1fc157617221eb612c /spec/services/notes | |
parent | 5e9196b3bcc31ce7fd698ed49af5d39eae1da630 (diff) | |
parent | 63b36241945a7f9bb280f360b3b269de8c5be8f6 (diff) | |
download | gitlab-ce-f208897ccbdb539eb16a72d32cce68881eaffca7.tar.gz |
Merge branch 'backport-time-tracking-ce' into 'master'
Backport timetracking to CE
See merge request !8195
Diffstat (limited to 'spec/services/notes')
-rw-r--r-- | spec/services/notes/slash_commands_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/notes/slash_commands_service_spec.rb b/spec/services/notes/slash_commands_service_spec.rb index 960b5cd5e6f..1a64c8bbf00 100644 --- a/spec/services/notes/slash_commands_service_spec.rb +++ b/spec/services/notes/slash_commands_service_spec.rb @@ -86,6 +86,18 @@ describe Notes::SlashCommandsService, services: true do expect(note.noteable).to be_open end end + + describe '/spend' do + let(:note_text) { '/spend 1h' } + + it 'updates the spent time on the noteable' do + content, command_params = service.extract_commands(note) + service.execute(command_params, note) + + expect(content).to eq '' + expect(note.noteable.time_spent).to eq(3600) + end + end end describe 'note with command & text' do |