Commit 5bbcc35b authored by Nikita Bulai's avatar Nikita Bulai Committed by Nikita Bulai

Fix specs and use GitLab code style guides

parent 05525d6b
......@@ -23,7 +23,7 @@ describe 'OAuth tokens' do
headers: headers
end
let(:client) { create(:oauth_application) }
let_it_be(:client) { create(:oauth_application) }
context 'when user has 2FA enabled' do
it 'does not create an access token' do
......@@ -51,7 +51,7 @@ describe 'OAuth tokens' do
end
context 'when client credentials provided' do
context "with valid credentials" do
context 'with valid credentials' do
it 'creates an access token' do
user = create(:user)
......@@ -62,8 +62,11 @@ describe 'OAuth tokens' do
end
end
context "with invalid credentials" do
context 'with invalid credentials' do
it 'does not create an access token' do
# NOTE: remove this after update to Doorkeeper 5.5 or newer
pending 'Enable this example after upgrading Doorkeeper to 5.5 or newer'
user = create(:user)
request_oauth_token(user, basic_auth_header(client.uid, 'invalid secret'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment