Last change
on this file since 369 was 369, checked in by KOBAYASHI, Shinji, 14 years ago |
merge from branches/0.5
|
File size:
973 bytes
|
Rev | Line | |
---|
[349] | 1 | require File.dirname(__FILE__) + '/../../../../spec_helper'
|
---|
| 2 | include OpenEHR::RM::EHR
|
---|
| 3 | include OpenEHR::RM::Security
|
---|
| 4 | include OpenEHR::RM::DataTypes::Text
|
---|
| 5 |
|
---|
| 6 | describe EHRAccess do
|
---|
| 7 | before(:each) do
|
---|
| 8 | name = DvText.new(:value => 'EHRAccess')
|
---|
| 9 | settings = stub(AccessControlSettings)
|
---|
| 10 | @ehr_access = EHRAccess.new(:archetype_node_id => 'at0001',
|
---|
| 11 | :name => name,
|
---|
| 12 | :settings => settings,
|
---|
| 13 | :scheme => 'SSL')
|
---|
| 14 | end
|
---|
| 15 |
|
---|
| 16 | it 'should be an instance of EHRAccess' do
|
---|
| 17 | @ehr_access.should be_an_instance_of EHRAccess
|
---|
| 18 | end
|
---|
| 19 |
|
---|
| 20 | it 'settings should be assigned, but Security package is not determined' do
|
---|
| 21 | @ehr_access.settings.should_not be_nil
|
---|
| 22 | end
|
---|
| 23 |
|
---|
| 24 | it 'schema should be assigned properly' do
|
---|
| 25 | @ehr_access.scheme.should == 'SSL'
|
---|
| 26 | end
|
---|
| 27 |
|
---|
| 28 | it 'should raise ArgumentError with nil schema' do
|
---|
| 29 | lambda {
|
---|
| 30 | @ehr_access.scheme = nil
|
---|
| 31 | }.should raise_error ArgumentError
|
---|
| 32 | end
|
---|
| 33 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.