Skip to content

Commit

Permalink
Fix the unit test for cloud_href filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
arangamani committed Mar 27, 2014
1 parent 702be0b commit 1386ce7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions spec/unit_test/provider_rightscale_backup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,18 @@
'rel' => 'cloud',
'href' => 'some_cloud_href'
}],
:href => 'some_href'
:href => 'some_href',
:cloud => cloud_stub
)
instance
end

let(:cloud_stub) do
cloud = double('cloud')
cloud.stub(:href => '/api/clouds/123')
cloud
end

let(:backup_stub) do
backup = double('backup')
backup.stub(
Expand Down Expand Up @@ -359,7 +366,8 @@ def create_test_volume_type(name, href)
"latest_before==#{timestamp.utc.strftime('%Y/%m/%d %H:%M:%S %z')}",
"committed==true",
"completed==true",
"from_master==true"
"from_master==true",
"cloud_href==/api/clouds/123"
]
backup_resource.should_receive(:index).with({
:lineage => 'some_lineage',
Expand Down

0 comments on commit 1386ce7

Please sign in to comment.