Sha256: 899388909c9c35608eab3f5ba7da4fe599b4f58077bc0ecca5d303156ccd44e3

Contents?: true

Size: 1.25 KB

Versions: 13

Compression:

Stored size: 1.25 KB

Contents

require "spec_helper"

describe Fog::Brightbox::Compute, "#two_factor?" do
  describe "when omitted" do
    before do
      @options = {
        brightbox_client_id: "app-12345",
        brightbox_secret: "1234567890",
        brightbox_username: "jason.null@brightbox.com",
        brightbox_password: "HR4life"
      }
      @service = Fog::Brightbox::Compute.new(@options)
    end

    it do
      refute @service.two_factor?
    end
  end

  describe "when disabled" do
    before do
      @options = {
        brightbox_client_id: "app-12345",
        brightbox_secret: "1234567890",
        brightbox_username: "jason.null@brightbox.com",
        brightbox_password: "HR4life",
        brightbox_support_two_factor: false
      }
      @service = Fog::Brightbox::Compute.new(@options)
    end

    it do
      refute @service.two_factor?
    end
  end

  describe "when enabled" do
    before do
      @options = {
        brightbox_client_id: "app-12345",
        brightbox_secret: "1234567890",
        brightbox_username: "jason.null@brightbox.com",
        brightbox_password: "HR4life",
        brightbox_support_two_factor: true
      }
      @service = Fog::Brightbox::Compute.new(@options)
    end

    it do
      assert @service.two_factor?
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-brightbox-1.12.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.11.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.10.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.9.1 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.9.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.8.2 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.8.1 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.8.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.7.3 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.7.2 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.7.1 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.7.0 spec/fog/brightbox/compute/two_factor_spec.rb
fog-brightbox-1.6.0 spec/fog/brightbox/compute/two_factor_spec.rb