Revert "Use inflector rule to acronym Api to API"

This reverts commit 06f5eb10d4.
This commit is contained in:
Maciej Szlosarczyk 2018-07-24 12:53:51 +03:00
parent 90b2455032
commit aac76b333c
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
25 changed files with 43 additions and 44 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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') }