Sha256: 66db2f70178cf410c66d0ab6d04cea7c45f75f9de58e76539be474e816906e84

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

describe BitBucket::Validations::Token do
  let(:token) { Class.new.extend(described_class) }

  describe '.validates_token_for' do
    it 'returns false if authentication token is not required' do
      expect(token.validates_token_for(:get, '/anotherpath')).to be false
    end

    it 'returns true if authentication token is required' do
      expect(token.validates_token_for(:get, '/user')).to be true
      expect(token.validates_token_for(:get, '/repos/a/b/comments')).to be true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bitbuckets-0.2.0 spec/bitbucket_rest_api/validations/token_spec.rb