spec/requests/main_spec.rb in merb-admin-0.6.6 vs spec/requests/main_spec.rb in merb-admin-0.6.7
- old
+ new
@@ -78,20 +78,17 @@
end
it "should show \"Site administration\"" do
@response.body.should contain("Site administration")
end
-
- it "should be sorted correctly" do
- @response.body.should contain(/Division.*Draft.*League.*Player.*Team/m)
- end
end
describe "dashboard with excluded models" do
before(:each) do
- MerbAdmin[:excluded_models] = [:Player]
+ MerbAdmin[:excluded_models] = ["Player"]
@response = request(url(:merb_admin_dashboard))
+ MerbAdmin[:excluded_models] = []
end
it "should respond sucessfully" do
@response.should be_successful
end
@@ -243,13 +240,13 @@
end
end
describe "list with 2 objects", :given => "two players exist" do
before(:each) do
- MerbAdmin[:paginate] = true
MerbAdmin[:per_page] = 1
@response = request(url(:merb_admin_list, :model_name => "player"))
+ MerbAdmin[:per_page] = 100
end
it "should respond sucessfully" do
@response.should be_successful
end
@@ -259,13 +256,13 @@
end
end
describe "list with 20 objects", :given => "twenty players exist" do
before(:each) do
- MerbAdmin[:paginate] = true
MerbAdmin[:per_page] = 1
@response = request(url(:merb_admin_list, :model_name => "player"))
+ MerbAdmin[:per_page] = 100
end
it "should respond sucessfully" do
@response.should be_successful
end
@@ -275,13 +272,13 @@
end
end
describe "list with 20 objects, page 8", :given => "twenty players exist" do
before(:each) do
- MerbAdmin[:paginate] = true
MerbAdmin[:per_page] = 1
@response = request(url(:merb_admin_list, :model_name => "player"), :params => {:page => 8})
+ MerbAdmin[:per_page] = 100
end
it "should respond sucessfully" do
@response.should be_successful
end
@@ -291,13 +288,13 @@
end
end
describe "list with 20 objects, page 17", :given => "twenty players exist" do
before(:each) do
- MerbAdmin[:paginate] = true
MerbAdmin[:per_page] = 1
@response = request(url(:merb_admin_list, :model_name => "player"), :params => {:page => 17})
+ MerbAdmin[:per_page] = 100
end
it "should respond sucessfully" do
@response.should be_successful
end
@@ -307,12 +304,12 @@
end
end
describe "list show all", :given => "two players exist" do
before(:each) do
- MerbAdmin[:paginate] = true
MerbAdmin[:per_page] = 1
@response = request(url(:merb_admin_list, :model_name => "player"), :params => {:all => true})
+ MerbAdmin[:per_page] = 100
end
it "should respond sucessfully" do
@response.should be_successful
end