Fix RSpec/DescribedClass
cop (#25104)
This commit is contained in:
parent
1e243e2df7
commit
c42591356d
66 changed files with 347 additions and 414 deletions
|
@ -9,17 +9,17 @@ RSpec.describe Import do
|
|||
|
||||
describe 'validations' do
|
||||
it 'has a valid parameters' do
|
||||
import = Import.create(account: account, type: type, data: data)
|
||||
import = described_class.create(account: account, type: type, data: data)
|
||||
expect(import).to be_valid
|
||||
end
|
||||
|
||||
it 'is invalid without an type' do
|
||||
import = Import.create(account: account, data: data)
|
||||
import = described_class.create(account: account, data: data)
|
||||
expect(import).to model_have_error_on_field(:type)
|
||||
end
|
||||
|
||||
it 'is invalid without a data' do
|
||||
import = Import.create(account: account, type: type)
|
||||
import = described_class.create(account: account, type: type)
|
||||
expect(import).to model_have_error_on_field(:data)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue