File: request_2fa_spec.rb

package info (click to toggle)
ruby-vagrant-cloud 3.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 408 kB
  • sloc: ruby: 4,343; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 679 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'spec_helper'
require 'vagrant_cloud'

describe VagrantCloud::Response::Request2FA do
  let(:subject) { described_class.new(destination: destination) }
  let(:destination) { "value" }

  describe "#initialize" do
    it "should create a new instance" do
      expect { subject }.not_to raise_error
    end

    it "should error if destination is not provided" do
      expect { described_class.new }.to raise_error(ArgumentError)
    end
  end

  describe "#destination" do
    it "should return a value" do
      expect(subject.destination).to eq(destination)
    end

    it "should freeze the value" do
      expect(subject.destination).to be_frozen
    end
  end
end