transferred Code Ocean from original repository to GitHub
This commit is contained in:
22
spec/models/consumer_spec.rb
Normal file
22
spec/models/consumer_spec.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe Consumer do
|
||||
let(:consumer) { Consumer.create }
|
||||
|
||||
it 'validates the presence of a name' do
|
||||
expect(consumer.errors[:name]).to be_present
|
||||
end
|
||||
|
||||
it 'validates the presence of an OAuth key' do
|
||||
expect(consumer.errors[:oauth_key]).to be_present
|
||||
end
|
||||
|
||||
it 'validates the uniqueness of the OAuth key' do
|
||||
consumer.update(oauth_key: FactoryGirl.create(:consumer).oauth_key)
|
||||
expect(consumer.errors[:oauth_key]).to be_present
|
||||
end
|
||||
|
||||
it 'validates the presence of an OAuth secret' do
|
||||
expect(consumer.errors[:oauth_secret]).to be_present
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user