Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-09 21:45:12 +0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-09 21:45:12 +0400
commitb7f9b8223e40aa9e4aa8579d9a062df7e2e1d959 (patch)
treec19509112a391cdfdb38995d25a70bf5e87102ca /spec/models/issue_spec.rb
parentf36f0dac9d2a009f29d2253dcd7c66d5a46ffd56 (diff)
Fix `search` class method for IssueCommonality
Also adds specs to the two affected classes that would have caught my dumb mistake.
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index fbd4031fa0b..806b8ee74e0 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -106,6 +106,14 @@ describe Issue do
end
end
+ describe ".search" do
+ let!(:issue) { Factory.create(:issue, :title => "Searchable issue",
+ :project => Factory.create(:project)) }
+
+ it "matches by title" do
+ Issue.search('able').all.should == [issue]
+ end
+ end
end
# == Schema Information
#