mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
24 lines
625 B
Ruby
24 lines
625 B
Ruby
require 'rails_helper'
|
|
|
|
describe WopiApp, type: :model do
|
|
it 'should be of class WopiApp' do
|
|
expect(subject.class).to eq WopiApp
|
|
end
|
|
|
|
describe 'Database table' do
|
|
it { should have_db_column :name }
|
|
it { should have_db_column :icon }
|
|
it { should have_db_column :wopi_discovery_id }
|
|
end
|
|
|
|
describe 'Relations' do
|
|
it { should belong_to :wopi_discovery }
|
|
it { should have_many :wopi_actions }
|
|
end
|
|
|
|
describe 'Should be a valid object' do
|
|
it { should validate_presence_of :name }
|
|
it { should validate_presence_of :icon }
|
|
it { should validate_presence_of :wopi_discovery }
|
|
end
|
|
end
|