diff options
author | Mike Wyatt <wyatt.mike@gmail.com> | 2015-12-16 10:08:05 -0400 |
---|---|---|
committer | Mike Wyatt <wyatt.mike@gmail.com> | 2015-12-16 10:08:05 -0400 |
commit | b45ee2c314e2c26f4574f2e973dfa40204860c66 (patch) | |
tree | d632ddcb66bba3ab581b389d592690029789d014 /spec/models | |
parent | 28a8d0b5db104be6d01ad647aefcd92ec9ec113e (diff) | |
download | gitlab-ce-b45ee2c314e2c26f4574f2e973dfa40204860c66.tar.gz |
better support for referencing and closing issues in asana_service.rb
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_services/asana_service_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/models/project_services/asana_service_spec.rb b/spec/models/project_services/asana_service_spec.rb index 64bb92fba95..e368b03206e 100644 --- a/spec/models/project_services/asana_service_spec.rb +++ b/spec/models/project_services/asana_service_spec.rb @@ -62,5 +62,26 @@ describe AsanaService, models: true do @asana.check_commit('fix #456789', 'pushed') end + + it 'should be able to close via url' do + expect(Asana::Task).to receive(:find).with('42').twice + + @asana.check_commit('closes https://app.asana.com/19292/956299/42', 'pushed') + end + + it 'should allow multiple matches per line' do + expect(Asana::Task).to receive(:find).with('123').twice + expect(Asana::Task).to receive(:find).with('456').twice + expect(Asana::Task).to receive(:find).with('789').once + + expect(Asana::Task).to receive(:find).with('42').once + expect(Asana::Task).to receive(:find).with('12').twice + + message = <<-EOF + minor bigfix, refactoring, fixed #123 and Closes #456 work on #789 + ref https://app.asana.com/19292/956299/42 and closing https://app.asana.com/19292/956299/12 + EOF + @asana.check_commit(message, 'pushed') + end end end |