mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
25 lines
677 B
Ruby
25 lines
677 B
Ruby
require 'rails_helper'
|
|
|
|
describe WopiAction, type: :model do
|
|
it 'should be of class WopiAction' do
|
|
expect(subject.class).to eq WopiAction
|
|
end
|
|
|
|
describe 'Database table' do
|
|
it { should have_db_column :action }
|
|
it { should have_db_column :extension }
|
|
it { should have_db_column :urlsrc }
|
|
it { should have_db_column :wopi_app_id }
|
|
end
|
|
|
|
describe 'Relations' do
|
|
it { should belong_to(:wopi_app) }
|
|
end
|
|
|
|
describe 'Should be a valid object' do
|
|
it { should validate_presence_of :action }
|
|
it { should validate_presence_of :extension }
|
|
it { should validate_presence_of :urlsrc }
|
|
it { should validate_presence_of :wopi_app }
|
|
end
|
|
end
|