spec/lib/brief/repository_spec.rb in brief-1.8.11 vs spec/lib/brief/repository_spec.rb in brief-1.8.12
- old
+ new
@@ -24,15 +24,15 @@
expect(items).not_to be_empty
expect(items.map(&:title).uniq).to include("Blueprint Epic Example")
end
it "finds the first document matching a query" do
- query = repository.where(state:"active")
+ query = repository.where(state:"active", type: "epic")
expect(query.first.type).to eq("epic")
end
it "finds the last document matching a query" do
- query = repository.where(state:"active")
+ query = repository.where(state:"active", type:"user_story")
expect(query.last.type).to eq("user_story")
end
it "respects the ordering" do
types = repository.order_by(:type).map(&:type)