<commit_before>require 'spec_helper'

describe PagSeguro::Authorization do
  describe '.authorize' do
    it 'makes a successful authorization' do
      params = {
        notificationURL: "foo",
        redirectURL: "bar",
        permissions: "RECEIVE_TRANSACTION_NOTIFICATIONS,SEARCH_TRANSACTIONS"
      }

      PagSeguro::Request
        .should_receive(:post)
        .with('/authorizations/request', params)
        .and_return(double.as_null_object)

      PagSeguro::Authorization.authorize(
        { app_id: 'app123', app_key: 'adsada', permissions: [:notifications, :searches] },
        'foo',
        'bar'
        )
    end
  end
end<commit_msg>Updates authorization test with new params<commit_after>require 'spec_helper'

describe PagSeguro::Authorization do
  describe '.authorize' do
    it 'makes a successful authorization' do
      params = {
        appId: 'app123',
        appKey: 'adsada',
        notificationURL: "foo",
        redirectURL: "bar",
        permissions: "RECEIVE_TRANSACTION_NOTIFICATIONS,SEARCH_TRANSACTIONS"
      }

      PagSeguro::Request
        .should_receive(:post)
        .with('/authorizations/request', params)
        .and_return(double.as_null_object)

      PagSeguro::Authorization.authorize(
        { app_id: 'app123', app_key: 'adsada', permissions: [:notifications, :searches] },
        'foo',
        'bar'
        )
    end
  end
end
{'fraction_non_alphanumeric': 0.10857142857142857, 'fraction_numerical': 0.0064285714285714285, 'mean_word_length': 2.807065217391304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1769734', 'n_tokens_mistral': 446, 'n_tokens_neox': 428, 'n_words': 86}