main
1# frozen_string_literal: true
2
3RSpec.describe Saml::Kit::Bindings::Binding do
4 subject { described_class.new(binding: Saml::Kit::Bindings::HTTP_ARTIFACT, location: location) }
5
6 let(:location) { FFaker::Internet.http_url }
7
8 describe '#serialize' do
9 it 'ignores other bindings' do
10 expect(subject.serialize(Saml::Kit::AuthenticationRequest)).to be_empty
11 end
12 end
13
14 describe '#deserialize' do
15 it 'raises an error' do
16 expect do
17 subject.deserialize('SAMLRequest' => 'CORRUPT')
18 end.to raise_error(/Unsupported binding/)
19 end
20 end
21end