scinote-web/spec/models/wopi_app_spec.rb
2017-08-30 13:30:41 +02:00

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