Files
codeocean/spec/models/code_ocean/error_spec.rb
Sebastian Serth 90defa8f89 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
2018-11-06 16:49:42 +01:00

20 lines
461 B
Ruby

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