From 83de70ccdce92ea99535f6e206dd45c0d47a8f9b Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Sun, 12 Jul 2015 16:13:50 +0300 Subject: [PATCH] MT#13717 Further tests adaptation to new collections Change-Id: I72de1c2adc008f02b7991b3f43ceee49ce31a739 --- t/api-root.t | 133 ++++++++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/t/api-root.t b/t/api-root.t index 5d43da68e8..be2f0c6506 100644 --- a/t/api-root.t +++ b/t/api-root.t @@ -45,72 +45,75 @@ $ua->ssl_opts( } my @links = $res->header('Link'); - my $rels = { applyrewrites => 1, - autoattendants => 1, - billingfees => 1, - billingnetworks => 1, - billingprofiles => 1, - billingzones => 1, - callcontrols => 1, - callforwards => 1, - calllists => 1, - calls => 1, - ccmapentries => 1, - cfdestinationsets => 1, - cfmappings => 1, - cftimesets => 1, - contracts => 1, - customerbalances => 1, - customercontacts => 1, - customerpreferencedefs => 1, - customerpreferences => 1, - customers => 1, - customerzonecosts => 1, - domainpreferencedefs => 1, - domainpreferences => 1, - domains => 1, - emailtemplates => 1, - faxserversettings => 1, - interceptions => 1, - invoices => 1, - invoicetemplates => 1, - ncoslevels => 1, - ncospatterns => 1, - pbxdeviceconfigfiles => 1, - pbxdeviceconfigs => 1, - pbxdevicefirmwarebinaries => 1, - pbxdevicefirmwares => 1, - pbxdevicemodels => 1, - pbxdevicemodelimages => 1, - pbxdeviceprofiles => 1, - pbxdevices => 1, - profilepackages => 1, - profilepreferences => 1, - profilepreferencedefs => 1, - reminders => 1, - resellers => 1, - rewriterules => 1, - rewriterulesets => 1, - soundfilerecordings => 1, - soundfiles => 1, - soundhandles => 1, - soundsets => 1, - speeddials => 1, - subscriberpreferencedefs => 1, - subscriberpreferences => 1, - subscriberprofiles => 1, - subscriberprofilesets => 1, - subscriberregistrations => 1, - subscribers => 1, - systemcontacts => 1, - trustedsources => 1, - voicemailrecordings => 1, - voicemails => 1, - voicemailsettings => 1, - vouchers => 1, - }; + my $rels = { + applyrewrites => 1, + autoattendants => 1, + billingfees => 1, + billingnetworks => 1, + billingprofiles => 1, + billingzones => 1, + callcontrols => 1, + callforwards => 1, + calllists => 1, + calls => 1, + ccmapentries => 1, + cfdestinationsets => 1, + cfmappings => 1, + cftimesets => 1, + contracts => 1, + customerbalances => 1, + customercontacts => 1, + customerpreferencedefs => 1, + customerpreferences => 1, + customers => 1, + customerzonecosts => 1, + domainpreferencedefs => 1, + domainpreferences => 1, + domains => 1, + emailtemplates => 1, + faxserversettings => 1, + interceptions => 1, + invoices => 1, + invoicetemplates => 1, + ncoslevels => 1, + ncospatterns => 1, + pbxdeviceconfigfiles => 1, + pbxdeviceconfigs => 1, + pbxdevicefirmwarebinaries => 1, + pbxdevicefirmwares => 1, + pbxdevicemodels => 1, + pbxdevicemodelimages => 1, + pbxdeviceprofiles => 1, + pbxdevices => 1, + profilepackages => 1, + profilepreferences => 1, + profilepreferencedefs => 1, + reminders => 1, + resellers => 1, + rewriterules => 1, + rewriterulesets => 1, + soundfilerecordings => 1, + soundfiles => 1, + soundhandles => 1, + soundsets => 1, + speeddials => 1, + subscriberpreferencedefs => 1, + subscriberpreferences => 1, + subscriberprofiles => 1, + subscriberprofilesets => 1, + subscriberregistrations => 1, + subscribers => 1, + systemcontacts => 1, + trustedsources => 1, + voicemailrecordings => 1, + voicemails => 1, + voicemailsettings => 1, + topupvouchers => 1, + topupcash => 1, + vouchers => 1, + }; foreach my $link(@links) { - my $rex = qr!^; rel="collection http://purl\.org/sipwise/ngcp-api/#rel-([a-z]+s)"$!; + my $rex = qr!^; rel="collection http://purl\.org/sipwise/ngcp-api/#rel-([a-z]+s|topupcash)"$!; like($link, $rex, "check for valid link syntax"); my ($relname) = ($link =~ $rex); ok(exists $rels->{$relname}, "check for '$relname' collection in Link");