summaryrefslogtreecommitdiff
path: root/spec/services/applications/create_service_spec.rb
blob: 47a2a9d640383a6c91227cb8f42c354b2b247f01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'spec_helper'

describe ::Applications::CreateService do
  let(:user) { create(:user) }
  let(:params) { attributes_for(:application) }
  let(:request) { ActionController::TestRequest.new(remote_ip: '127.0.0.1') }

  subject { described_class.new(user, params) }

  it 'creates an application' do
    expect { subject.execute(request) }.to change { Doorkeeper::Application.count }.by(1)
  end
end