added couchrest-type back in to model
This commit is contained in:
parent
555764bbe8
commit
8533520ef9
2 changed files with 10 additions and 5 deletions
|
@ -412,6 +412,12 @@ describe CouchRest::Model do
|
|||
view['rows'].length.should == 4
|
||||
end
|
||||
|
||||
it "should not include non-Articles" do
|
||||
Article.database.save({"date" => 1})
|
||||
view = Article.by_date :raw => true
|
||||
view['rows'].length.should == 4
|
||||
end
|
||||
|
||||
it "should return the matching objects (with default argument :descending => true)" do
|
||||
articles = Article.by_date
|
||||
articles.collect{|a|a.title}.should == @titles.reverse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue