mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Revert "Use inflector rule to acronym Api to API"
This reverts commit 06f5eb10d4
.
This commit is contained in:
parent
90b2455032
commit
aac76b333c
25 changed files with 43 additions and 44 deletions
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :api_user do
|
||||
sequence(:username) { |n| "test#{n}" }
|
||||
password 'a' * APIUser.min_password_length
|
||||
password 'a' * ApiUser.min_password_length
|
||||
roles ['super']
|
||||
registrar
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe APIUser do
|
||||
RSpec.describe ApiUser do
|
||||
context 'with invalid attribute' do
|
||||
before do
|
||||
@api_user = APIUser.new
|
||||
@api_user = ApiUser.new
|
||||
end
|
||||
|
||||
it 'should not be valid' do
|
||||
@api_user.valid?
|
||||
@api_user.errors.full_messages.should match_array([
|
||||
"Password Password is missing",
|
||||
"Password is too short (minimum is #{APIUser.min_password_length} characters)",
|
||||
"Password is too short (minimum is #{ApiUser.min_password_length} characters)",
|
||||
"Registrar Registrar is missing",
|
||||
"Username Username is missing",
|
||||
"Roles is missing"
|
||||
|
|
|
@ -316,10 +316,10 @@ RSpec.describe Domain do
|
|||
@api_user = create(:api_user)
|
||||
@user.id.should == 1
|
||||
@api_user.id.should == 2
|
||||
::PaperTrail.whodunnit = '2-APIUser: testuser'
|
||||
::PaperTrail.whodunnit = '2-ApiUser: testuser'
|
||||
|
||||
@domain = create(:domain)
|
||||
@domain.creator_str.should == '2-APIUser: testuser'
|
||||
@domain.creator_str.should == '2-ApiUser: testuser'
|
||||
|
||||
@domain.creator.should == @api_user
|
||||
@domain.creator.should_not == @user
|
||||
|
|
|
@ -4,7 +4,7 @@ RSpec.describe UserPresenter do
|
|||
let(:presenter) { described_class.new(user: user, view: view) }
|
||||
|
||||
describe '#login_with_role' do
|
||||
let(:user) { instance_double(APIUser,
|
||||
let(:user) { instance_double(ApiUser,
|
||||
login: 'login',
|
||||
roles: %w[role],
|
||||
registrar_name: 'registrar') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue