test/functional/kaui/home_controller_test.rb in kaui-0.15.5 vs test/functional/kaui/home_controller_test.rb in kaui-0.16.0
- old
+ new
@@ -1,9 +1,14 @@
require 'test_helper'
class Kaui::HomeControllerTest < Kaui::FunctionalTestHelper
+ test 'should get index' do
+ get :index
+ assert_response :success
+ end
+
test 'should understand search queries' do
get :search, :q => 'John Doe'
assert_redirected_to accounts_path(:q => 'John Doe')
get :search, :q => 'de305d54-75b4-431b-adb2-eb6b9e546014'
@@ -18,7 +23,11 @@
get :search, :q => 'invoice:546014'
assert_redirected_to invoice_path(:id => '546014')
get :search, :q => 'payment:546014'
assert_redirected_to payment_path(:id => '546014')
+
+ get :search, :q => "transaction:#{@payment.transactions.first.transaction_id}"
+ assert_redirected_to transaction_path(:id => @payment.transactions.first.transaction_id)
+
end
end