spec/unit/batch_actions/resource_spec.rb in activeadmin-1.0.0.pre1 vs spec/unit/batch_actions/resource_spec.rb in activeadmin-1.0.0.pre2
- old
+ new
@@ -56,9 +56,14 @@
it "returns the path as a symbol" do
expect(resource.batch_action_path).to eq "/admin/posts/batch_action"
end
+ it "includes :scope and :q params" do
+ params = { q: { name_equals: "Any" }, scope: :all }
+ batch_action_path = "/admin/posts/batch_action?q%5Bname_equals%5D=Any&scope=all"
+ expect(resource.batch_action_path(params)).to eq(batch_action_path)
+ end
end
describe "#display_if_block" do
it "should return true by default" do