DEV: Use proper wording for contexts in specs

This commit is contained in:
Loïc Guitaut
2022-07-27 18:14:14 +02:00
committed by Loïc Guitaut
parent 02987e05d5
commit 3eaac56797
337 changed files with 2172 additions and 2723 deletions

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true
RSpec.describe UserApiKeysController do
let :public_key do
<<~TXT
-----BEGIN PUBLIC KEY-----
@ -44,7 +43,7 @@ RSpec.describe UserApiKeysController do
}
end
context 'new' do
describe '#new' do
it "supports a head request cleanly" do
head "/user-api-key/new"
expect(response.status).to eq(200)
@ -52,8 +51,7 @@ RSpec.describe UserApiKeysController do
end
end
context 'create' do
describe '#create' do
it "does not allow anon" do
post "/user-api-key.json", params: args
expect(response.status).to eq(403)