mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
27 lines
835 B
Ruby
27 lines
835 B
Ruby
require 'rails_helper'
|
|
|
|
describe WopiDiscovery, type: :model do
|
|
it 'should be of class WopiDiscovery' do
|
|
expect(subject.class).to eq WopiDiscovery
|
|
end
|
|
|
|
describe 'Database table' do
|
|
it { should have_db_column :expires }
|
|
it { should have_db_column :proof_key_mod }
|
|
it { should have_db_column :proof_key_exp }
|
|
it { should have_db_column :proof_key_old_mod }
|
|
it { should have_db_column :proof_key_old_exp }
|
|
end
|
|
|
|
describe 'Relations' do
|
|
it { should have_many :wopi_apps }
|
|
end
|
|
|
|
describe 'Should be a valid object' do
|
|
it { should validate_presence_of :expires }
|
|
it { should validate_presence_of :proof_key_mod }
|
|
it { should validate_presence_of :proof_key_exp }
|
|
it { should validate_presence_of :proof_key_old_mod }
|
|
it { should validate_presence_of :proof_key_old_exp }
|
|
end
|
|
end
|