test/dummy/db/seeds.rb in valid_route-0.0.2 vs test/dummy/db/seeds.rb in valid_route-0.0.3
- old
+ new
@@ -1,4 +1,17 @@
-FactoryGirl.create(:home_page)
-FactoryGirl.create(:contact_page)
+unless Page.exists?('home')
+ Page.create(
+ {:name => 'Home', :permalink => 'home', :content => 'Home Page'},
+ )
+end
-FactoryGirl.create(:user, username: "vjm", first_name: "Vince", password: "weekend")
+unless Page.exists?('contact')
+ Page.create(
+ {:name => 'Contact', :permalink => 'contact', :content => 'Contact Page'}
+ )
+end
+
+unless User.exists?('admin')
+ User.create(
+ {:username => 'admin', :first_name => 'Admin', :password => 'password'}
+ )
+end
\ No newline at end of file