Sha256: c852bf512f692013bcb789094df7d81bccf396c2f042416512ac6d937d1e64c0

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

require 'test_helper'

class AutocompleteControllerTest < ActionController::TestCase
  context 'AutocompleteController' do
    setup do
      @tag = Factory(:tag, :name => 'Music')
    end
    
    context 'get #index' do
      setup do
        get :index, :model => 'tag', :q => "Mus", :format => 'json'
      end
      
      should respond_with(:success)
      should respond_with_content_type(:json)
    end
    
    context 'get #index with no value' do
      setup do
        get :index, :model => 'tag', :format => 'json'
      end
      
      should respond_with(:success)
      should respond_with_content_type(:json)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aa_associations-0.1.2 test/autocomplete_controller_test.rb
aa_associations-0.1.1 test/autocomplete_controller_test.rb
aa_associations-0.1.0 test/autocomplete_controller_test.rb