myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3585] trunk/test/functional/workflows_controller


From: noreply
Subject: [myexperiment-hackers] [3585] trunk/test/functional/workflows_controller_test.rb: added basic test case for search index
Date: Mon, 1 Jul 2013 10:35:35 +0000 (UTC)

Revision
3585
Author
dgc
Date
2013-07-01 10:35:34 +0000 (Mon, 01 Jul 2013)

Log Message

added basic test case for search index

Modified Paths

Diff

Modified: trunk/test/functional/workflows_controller_test.rb (3584 => 3585)


--- trunk/test/functional/workflows_controller_test.rb	2013-06-07 08:32:29 UTC (rev 3584)
+++ trunk/test/functional/workflows_controller_test.rb	2013-07-01 10:35:34 UTC (rev 3585)
@@ -4,7 +4,7 @@
 # Copyright (c) 2007 University of Manchester and the University of Southampton.
 # See license.txt for details.
 
-require File.dirname(__FILE__) + '/../test_helper'
+require_relative '../test_helper'
 require 'workflows_controller'
 
 class WorkflowsControllerTest < ActionController::TestCase
@@ -37,9 +37,17 @@
 
     assert_redirected_to workflow_path(assigns(:workflow))
     assert_equal old_count+1, Workflow.count
+
+    # Test searches
+
+    workflow = Workflow.last
+
+    # Basic test that the workflow was indexed in Solr and that it appears in a search result.
+    assert Workflow.search { fulltext "dilbert" }.results.include?(workflow)
   end
 
   def test_should_show_workflow
+
     get :show, :id => 1
     assert_response :success
   end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]