Commit f2bc33e
Changed files (3)
spec
spec/saml/kit/cli/commands/decode_spec.rb
@@ -1,5 +1,5 @@
RSpec.describe Saml::Kit::Cli::Commands::Decode do
- let(:user) { double(name_id_for: SecureRandom.uuid) }
+ let(:user) { User.new(SecureRandom.uuid) }
describe '#redirect' do
let(:command) { "decode redirect #{redirect_binding.serialize(builder)[0]}" }
spec/support/user.rb
@@ -0,0 +1,9 @@
+class User
+ def initialize(id)
+ @id = id
+ end
+
+ def name_id_for(_format)
+ @id
+ end
+end
spec/spec_helper.rb
@@ -3,6 +3,7 @@ require 'saml/kit/cli'
require 'securerandom'
require 'tempfile'
require_relative 'support/shell_helpers.rb'
+require_relative 'support/user.rb'
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure