Syntax for specs adjusted for consistency reasons
is_expected.to has been replaced by should is_expected.not_to has been replaced by should_not
This commit is contained in:
@@ -17,24 +17,24 @@ describe ProposalExecutedDashboardAction do
|
||||
let(:executed_at) { Time.current }
|
||||
let(:comments) { '' }
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
it { should be_valid }
|
||||
|
||||
context 'when proposal is nil' do
|
||||
let(:proposal) { nil }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
it { should_not be_valid }
|
||||
end
|
||||
|
||||
context 'when proposal_dashboard_action is nil' do
|
||||
let(:proposal_dashboard_action) { nil }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
it { should_not be_valid }
|
||||
end
|
||||
|
||||
context 'when executed_at is nil' do
|
||||
let(:executed_at) { nil }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
it { should_not be_valid }
|
||||
end
|
||||
|
||||
context 'when the action sends a request to the administrators' do
|
||||
@@ -43,19 +43,19 @@ describe ProposalExecutedDashboardAction do
|
||||
context 'and comments are blank' do
|
||||
let(:comments) { '' }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
it { should_not be_valid }
|
||||
end
|
||||
|
||||
context 'and comments have value' do
|
||||
let(:comments) { Faker::Lorem.sentence }
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
it { should be_valid }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when it has been already executed' do
|
||||
let!(:executed) { create(:proposal_executed_dashboard_action, proposal: proposal, proposal_dashboard_action: proposal_dashboard_action) }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
it { should_not be_valid }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user