mirror of https://github.com/mastodon/mastodon
Remove duplicate fabricator validity checks (#29667)
This commit is contained in:
parent
88cfc4056d
commit
1622f7aeb9
|
@ -8,11 +8,6 @@ RSpec.describe Import do
|
||||||
let(:data) { attachment_fixture('imports.txt') }
|
let(:data) { attachment_fixture('imports.txt') }
|
||||||
|
|
||||||
describe 'validations' do
|
describe 'validations' do
|
||||||
it 'has a valid parameters' do
|
|
||||||
import = described_class.create(account: account, type: type, data: data)
|
|
||||||
expect(import).to be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'is invalid without an type' do
|
it 'is invalid without an type' do
|
||||||
import = described_class.create(account: account, data: data)
|
import = described_class.create(account: account, data: data)
|
||||||
expect(import).to model_have_error_on_field(:type)
|
expect(import).to model_have_error_on_field(:type)
|
||||||
|
|
|
@ -31,14 +31,6 @@ describe Poll do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'validations' do
|
describe 'validations' do
|
||||||
context 'when valid' do
|
|
||||||
let(:poll) { Fabricate.build(:poll) }
|
|
||||||
|
|
||||||
it 'is valid with valid attributes' do
|
|
||||||
expect(poll).to be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when not valid' do
|
context 'when not valid' do
|
||||||
let(:poll) { Fabricate.build(:poll, expires_at: nil) }
|
let(:poll) { Fabricate.build(:poll, expires_at: nil) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue