Sha256: abeecbd8d3511c33ab0846beb39029a376de7d22c5604b987900ebbb127fb3f3
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 Bytes
Contents
RSpec.describe Bluekai::Request do describe '#signature' do it 'computes a correct signature' do subject = described_class.new( 'GET', '/Services/WS/classificationCategories/', { ho: 'blabli' }, { key1: 'value1', key2: 'value2' }, 'https://services.bluekai.com') subject.api_private_key = '1234' expect(subject.signature).to eq('t%2BE36Yup7ORbC3WRux5xY7ohUxqFo5AGsKrGjJYDCKs%3D') end it 'accounts for nested GET url params' do subject = described_class.new( 'GET', '/getdata/1234/v1.2', { puserid: '42', phint: { event: 'click', offer_id: 1234 } }, {}, 'https://services.bluekai.com') subject.api_private_key = '1234' expect(subject.signature).to eq('KOl1c80m2SQ6%2Fv5K0OLAUKejcrw6zXEsQ9crbcV6n3Y%3D') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bluekai-0.0.5 | spec/lib/bluekai/request_spec.rb |