Sha256: dde3e9b63505d8c7ced2cf6ff20dde25aa7df40767e562a993771a48d5338d82
Contents?: true
Size: 738 Bytes
Versions: 1
Compression:
Stored size: 738 Bytes
Contents
require 'acceptance/spec_helper' RSpec.describe 'Connections', :live => true do let(:maximum) { (2 ** 23) - 1 } let(:query) { "SELECT * FROM book_core WHERE MATCH('')" } let(:difference) { maximum - query.length } it 'allows normal length queries through' do expect { ThinkingSphinx::Connection.take do |connection| connection.execute query.insert(-3, 'a' * difference) end }.to_not raise_error#(ThinkingSphinx::QueryLengthError) end it 'does not allow overly long queries' do expect { ThinkingSphinx::Connection.take do |connection| connection.execute query.insert(-3, 'a' * (difference + 1)) end }.to raise_error(ThinkingSphinx::QueryLengthError) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thinking-sphinx-3.3.0 | spec/acceptance/connection_spec.rb |