Always create a default study group for new consumers
This commit is contained in:

committed by
Sebastian Serth

parent
521626275f
commit
cb1b163b30
@ -4,6 +4,7 @@ require 'rails_helper'
|
||||
|
||||
describe Consumer do
|
||||
let(:consumer) { described_class.create }
|
||||
let(:valid_consumer) { create(:consumer) }
|
||||
|
||||
it 'validates the presence of a name' do
|
||||
expect(consumer.errors[:name]).to be_present
|
||||
@ -21,4 +22,8 @@ describe Consumer do
|
||||
it 'validates the presence of an OAuth secret' do
|
||||
expect(consumer.errors[:oauth_secret]).to be_present
|
||||
end
|
||||
|
||||
it 'creates a study group after creation' do
|
||||
expect(valid_consumer.study_groups.count).to eq 1
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user