2018-10-10 04:45:49 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-02 04:12:20 -04:00
|
|
|
require "spec_helper"
|
2017-10-24 02:38:06 -04:00
|
|
|
|
|
|
|
describe ::Applications::CreateService do
|
2018-10-10 04:45:49 -04:00
|
|
|
include TestRequestHelpers
|
|
|
|
|
2017-10-24 02:38:06 -04:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:params) { attributes_for(:application) }
|
|
|
|
|
|
|
|
subject { described_class.new(user, params) }
|
|
|
|
|
2018-10-10 04:45:49 -04:00
|
|
|
it { expect { subject.execute(test_request) }.to change { Doorkeeper::Application.count }.by(1) }
|
2017-10-24 02:38:06 -04:00
|
|
|
end
|