lib/rails/templates/search_controller_test.rb in elasticsearch-rails-5.1.0 vs lib/rails/templates/search_controller_test.rb in elasticsearch-rails-6.0.0.pre
- old
+ new
@@ -1,9 +1,9 @@
require 'test_helper'
class SearchControllerTest < ActionController::TestCase
setup do
- Time.stubs(:now).returns(Time.new(2015, 03, 16, 10, 00, 00, 0))
+ travel_to Time.new(2015, 03, 16, 10, 00, 00, 0)
Article.delete_all
articles = [
{ title: 'Article One', abstract: 'One', content: 'One', published_on: 1.day.ago, category_title: 'One', author_first_name: 'John', author_last_name: 'Smith' },