diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-09 13:45:12 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-09 13:45:12 -0400 |
commit | b7f9b8223e40aa9e4aa8579d9a062df7e2e1d959 (patch) | |
tree | c19509112a391cdfdb38995d25a70bf5e87102ca /spec/models/merge_request_spec.rb | |
parent | f36f0dac9d2a009f29d2253dcd7c66d5a46ffd56 (diff) | |
download | gitlab-ce-b7f9b8223e40aa9e4aa8579d9a062df7e2e1d959.tar.gz |
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/merge_request_spec.rb')
-rw-r--r-- | spec/models/merge_request_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index ac986ccebe3..4ef6becf41b 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -56,6 +56,15 @@ describe MergeRequest do subject.upvotes.should == 2 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 # |