test/unit/garb/management/web_property_test.rb in garb-0.8.4 vs test/unit/garb/management/web_property_test.rb in garb-0.8.5
- old
+ new
@@ -6,16 +6,16 @@
context "the WebProperty class" do
should "turn entries for path into array of web properties" do
feed = stub(:entries => ["entry1"])
Feed.stubs(:new).returns(feed)
- WebProperty.stubs(:new)
+ WebProperty.stubs(:new_from_entry)
WebProperty.all
assert_received(Feed, :new) {|e| e.with(Session, '/accounts/~all/webproperties')}
assert_received(feed, :entries)
- assert_received(WebProperty, :new) {|e| e.with("entry1", Session)}
+ assert_received(WebProperty, :new_from_entry) {|e| e.with("entry1", Session)}
end
should "find all web properties for a given account" do
WebProperty.stubs(:all)
WebProperty.for_account(stub(:session => Session, :path => '/accounts/123456'))
@@ -34,10 +34,10 @@
{"name" => "ga:accountId", "value" => "1189765"},
{"name" => "ga:webPropertyId", "value" => 'UA-1189765-1'}
]
}
- @web_property = WebProperty.new(entry, Session)
+ @web_property = WebProperty.new_from_entry(entry, Session)
end
should "have an id" do
assert_equal "UA-1189765-1", @web_property.id
end