spec/boomi/boomi_spec.rb in boomi-ruby-0.3.0 vs spec/boomi/boomi_spec.rb in boomi-ruby-0.4.0

- old
+ new

@@ -7,11 +7,11 @@ before do # log to stdout & proxy # RestClient.log = Logger.new(STDOUT) # RestClient.proxy = 'http://localhost:8080/' -# FakeWeb.allow_net_connect = false + # FakeWeb.allow_net_connect = false end context "parent account" do before do @boomi = Boomi.new(:account => 'boo-me', :user => 'boo-user', :pass => 'boo-you') @@ -35,9 +35,16 @@ FakeWeb.register_uri(:post, %r(https://.*@platform.boomi.com/api/rest/v1/.*/Event/.*), :body => File.join(XML_PATH, "getEvent-1result.xml")) records = @boomi.get_execution_records("executionTime[GREATER_THAN_OR_EQUAL]" => Time.now-15*60) records.size.should == 3 events = @boomi.get_events("executionId[EQUALS]" => records[0]['executionId'], "eventDate[GREATER_THAN_OR_EQUAL]" => records[0]['executionTime']) events.size.should == 1 + end + + it 'should be able to copy environment extensions' do + FakeWeb.register_uri(:get, %r(https://.*@platform.boomi.com/api/rest/v1/.*/EnvironmentExtensions/myfakeaccount), :body => File.join(XML_PATH, "getEnvironmentExtensions.xml")) + FakeWeb.register_uri(:post, %r(https://.*@platform.boomi.com/api/rest/v1/.*/EnvironmentExtensions/mynewaccount), :body => File.join(XML_PATH, "getEnvironmentExtensions.xml")) + records = @boomi.copy_environment_extensions_xml("myfakeaccount", "mynewaccount") + records.should_not be_empty end end end end