mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
15 lines
351 B
Ruby
15 lines
351 B
Ruby
require 'spec_helper'
|
|
|
|
describe Resource do
|
|
let(:conference) { create(:conference) }
|
|
let(:resource) { create :resource }
|
|
|
|
it 'has a valid factory' do
|
|
expect(build(:resource)).to be_valid
|
|
end
|
|
|
|
it 'is not valid with used greater than quantity' do
|
|
resource.used = resource.quantity + 1
|
|
expect(resource.valid?).to eq false
|
|
end
|
|
end
|