Fix tests and rename request
variable in specs to perform_request
Explanation: Using the variable name `request` might interfere with methods in Rails core system prevent successful test execution. See this issue: https://github.com/turbolinks/turbolinks-rails/issues/38
This commit is contained in:
19
spec/models/code_ocean/error_spec.rb
Normal file
19
spec/models/code_ocean/error_spec.rb
Normal file
@ -0,0 +1,19 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe CodeOcean::Error do
|
||||
let(:error) { described_class.create }
|
||||
|
||||
it 'validates the presence of an execution environment' do
|
||||
expect(error.errors[:execution_environment_id]).to be_present
|
||||
end
|
||||
|
||||
it 'validates the presence of a message' do
|
||||
expect(error.errors[:message]).to be_present
|
||||
end
|
||||
|
||||
describe '.nested_resource?' do
|
||||
it 'is true' do
|
||||
expect(described_class.nested_resource?).to be true
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user