Sha256: 5ed912c8b8dafc3451eb6685168fcb417488f96009f5f859dc71e2de3c08f640

Contents?: true

Size: 901 Bytes

Versions: 11

Compression:

Stored size: 901 Bytes

Contents

module SecureHeaders
  describe XDownloadOptions do
    specify { expect(XDownloadOptions.new.name).to eq(XDO_HEADER_NAME)}
    specify { expect(XDownloadOptions.new.value).to eq("noopen")}
    specify { expect(XDownloadOptions.new('noopen').value).to eq('noopen')}
    specify { expect(XDownloadOptions.new(:value => 'noopen').value).to eq('noopen') }

    context "invalid configuration values" do
      it "accepts noopen" do
        expect {
          XDownloadOptions.new("noopen")
        }.not_to raise_error

        expect {
          XDownloadOptions.new(:value => "noopen")
        }.not_to raise_error
      end

      it "accepts nil" do
        expect {
          XDownloadOptions.new
        }.not_to raise_error
      end

      it "doesn't accept anything besides noopen" do
        expect {
          XDownloadOptions.new("open")
        }.to raise_error
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
secure_headers-2.3.0 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.2.4 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.2.3 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.2.2 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.2.1 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.2.0 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.1.0 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.0.2 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.0.1 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.0.0 spec/lib/secure_headers/headers/x_download_options_spec.rb
secure_headers-2.0.0.pre2 spec/lib/secure_headers/headers/x_download_options_spec.rb