Permalink
Browse files

Fix failing mysql spec by increasing nested page updated_at timestamp.

  • Loading branch information...
1 parent c09d107 commit 806601b2dfa361282105a8ed1d281a6c9d423478 @ugisozols ugisozols committed May 25, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 dashboard/spec/requests/refinery/admin/dashboard_spec.rb
View
7 dashboard/spec/requests/refinery/admin/dashboard_spec.rb
@@ -49,10 +49,13 @@
# see https://github.com/resolve/refinerycms/issues/1673
it "uses proper link for nested pages" do
- nested = FactoryGirl.create :page, :parent_id => Refinery::Page.last.id
+ # we need to increase updated_at because dashboard entries are sorted by
+ # updated_at column and we need this page to be at the top of the list
+ nested = FactoryGirl.create(:page, :parent_id => Refinery::Page.last.id,
+ :updated_at => Time.now + 10.seconds)
visit refinery.admin_dashboard_path
-
+
page.should have_selector("a[href='#{refinery.edit_admin_page_path(nested.uncached_nested_url)}']")
end
end

0 comments on commit 806601b

Please sign in to comment.