mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
1c21e11510
* Initial test for stock management * Repository stock values adding [does not work] SCI-6420 * Fix typos SCI-6420 * Fix test [SCI-6420] * Test changes [SCI-6402] * Remove locking test [SCI-6420] * Remove lock [SCI-6420] * Remove serializer [SCI-6420] * Fix stock test and add ledger creation on consume [SCI-6420]
32 lines
909 B
Ruby
32 lines
909 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe RepositoryStockUnitItem, type: :model do
|
|
let(:repository_stock_unit_item) { build :repository_stock_unit_item }
|
|
|
|
it 'is valid' do
|
|
expect(repository_stock_unit_item).to be_valid
|
|
end
|
|
|
|
it 'should be of class RepositoryStockUnitItem' do
|
|
expect(subject.class).to eq RepositoryStockUnitItem
|
|
end
|
|
|
|
describe 'Database table' do
|
|
it { should have_db_column :id }
|
|
it { should have_db_column :data }
|
|
it { should have_db_column :repository_column_id }
|
|
it { should have_db_column :created_by_id }
|
|
it { should have_db_column :last_modified_by_id }
|
|
it { should have_db_column :created_at }
|
|
it { should have_db_column :updated_at }
|
|
end
|
|
|
|
describe 'Associations' do
|
|
it { should belong_to(:repository_column) }
|
|
it { should belong_to(:created_by) }
|
|
it { should belong_to(:last_modified_by) }
|
|
end
|
|
|
|
end
|