Sha256: e999f6be758e9cd193c92fa577a0b5a123d8952be0bcf18d2ef44416403786bb

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

require 'test_helper'

class SearchesControllerTest < ActionDispatch::IntegrationTest
  setup do
    @search = searches(:one)
  end

  test "should get index" do
    get searches_url
    assert_response :success
  end

  test "should get new" do
    get new_search_url
    assert_response :success
  end

  test "should create search" do
    assert_difference('Search.count') do
      post searches_url, params: { search: { query: @search.query } }
    end

    assert_redirected_to search_url(Search.last)
  end

  test "should show search" do
    get search_url(@search)
    assert_response :success
  end

  test "should get edit" do
    get edit_search_url(@search)
    assert_response :success
  end

  test "should update search" do
    patch search_url(@search), params: { search: { query: @search.query } }
    assert_redirected_to search_url(@search)
  end

  test "should destroy search" do
    assert_difference('Search.count', -1) do
      delete search_url(@search)
    end

    assert_redirected_to searches_url
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jester-data-8.0.0 test/controllers/searches_controller_test.rb
ezii-os-5.2.1 test/controllers/searches_controller_test.rb
ezii-os-2.0.1 test/controllers/searches_controller_test.rb
ezii-os-1.1.0 test/controllers/searches_controller_test.rb
ezii-os-1.0.0 test/controllers/searches_controller_test.rb