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