~ubuntu-branches/ubuntu/wily/puppet/wily

« back to all changes in this revision

Viewing changes to spec/unit/relationship_spec.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2014-04-17 14:50:28 UTC
  • mfrom: (3.1.59 sid)
  • Revision ID: package-import@ubuntu.com-20140417145028-j3p3dwvp8ggpzvaf
Tags: 3.5.1-1
ImportedĀ upstreamĀ releaseĀ 3.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
  # LAK:NOTE For all of these tests, we convert back to the edge so we can
212
212
  # trap the actual data structure then.
213
213
  it "should pass the source in as the first argument" do
214
 
    Puppet::Relationship.from_pson("source" => "mysource", "target" => "mytarget").source.should == "mysource"
 
214
    Puppet::Relationship.from_data_hash("source" => "mysource", "target" => "mytarget").source.should == "mysource"
215
215
  end
216
216
 
217
217
  it "should pass the target in as the second argument" do
218
 
    Puppet::Relationship.from_pson("source" => "mysource", "target" => "mytarget").target.should == "mytarget"
 
218
    Puppet::Relationship.from_data_hash("source" => "mysource", "target" => "mytarget").target.should == "mytarget"
219
219
  end
220
220
 
221
221
  it "should pass the event as an argument if it's provided" do
222
 
    Puppet::Relationship.from_pson("source" => "mysource", "target" => "mytarget", "event" => "myevent", "callback" => "eh").event.should == "myevent"
 
222
    Puppet::Relationship.from_data_hash("source" => "mysource", "target" => "mytarget", "event" => "myevent", "callback" => "eh").event.should == "myevent"
223
223
  end
224
224
 
225
225
  it "should pass the callback as an argument if it's provided" do
226
 
    Puppet::Relationship.from_pson("source" => "mysource", "target" => "mytarget", "callback" => "mycallback").callback.should == "mycallback"
 
226
    Puppet::Relationship.from_data_hash("source" => "mysource", "target" => "mytarget", "callback" => "mycallback").callback.should == "mycallback"
227
227
  end
228
228
end