autocomplete_controller_test.rb revision 38dab3b63e2730b443590a53de93e085659efe25
require 'test_helper'
context 'users and teams' do
setup do
@term = 'foo'
end
context 'on GET to index' do
context 'with results' do
setup do
scope: 'User,Team',
end
should 'return two entries' do
end
end
context 'with results, one excluded' do
setup do
scope: 'User,Team',
end
should 'return one entry' do
end
end
context 'without results' do
setup do
scope: 'User,Team',
term: 'xxxyyyzzz'
end
end
end
end
context 'on GET to index' do
context 'with invalid scope' do
setup do
scope: 'foo',
term: 'bar'
end
end
context 'without scope' do
should "throw RuntimeError" do
term: 'foo'
end
end
end
context 'on GET to index with empty term' do
setup do
scope: 'foo',
term: ''
end
end
context 'on GET to index without term' do
setup do
scope: 'foo'
end
end
end
end