From fecd9c0cb22eda0a208042c568d8d833a1bd6292 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Sun, 5 Oct 2014 21:17:28 -0500 Subject: Add specs for tasks Add tests for the new task list functionality in the Markdown parser and in issues and merge requests. --- spec/models/issue_spec.rb | 4 ++++ spec/models/merge_request_spec.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'spec/models') diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 8b299cea67c..6b6efe832e5 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -60,4 +60,8 @@ describe Issue do let(:backref_text) { "issue ##{subject.iid}" } let(:set_mentionable_text) { ->(txt){ subject.description = txt } } end + + it_behaves_like 'a Taskable' do + let(:subject) { create :issue } + end end diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index c40f75290ed..7b0d261d72f 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -119,4 +119,8 @@ describe MergeRequest do let(:backref_text) { "merge request !#{subject.iid}" } let(:set_mentionable_text) { ->(txt){ subject.title = txt } } end + + it_behaves_like 'a Taskable' do + let(:subject) { create :merge_request, :simple } + end end -- cgit v1.2.1