File: register_request_spec.rb

package info (click to toggle)
ruby-u2f 0.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 164 kB
  • sloc: ruby: 727; makefile: 12
file content (21 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe U2F::RegisterRequest do
  let(:app_id) { 'http://example.com' }
  let(:challenge) { 'fEnc9oV79EaBgK5BoNERU5gPKM2XGYWrz4fUjgc0Q7g' }

  let(:sign_request) do
    U2F::RegisterRequest.new(challenge, app_id)
  end

  describe '#to_json' do
    subject { sign_request.to_json }
    it do
      is_expected.to match_json_expression(
        version: String,
        appId: String,
        challenge: String
      )
    end
  end
end