mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-05-07 05:53:07 +00:00
Fix the serialized account type in the vCard 4.0
Fix the tests Fix the default type in AccountFactory
This commit is contained in:
parent
f3ffa96ea6
commit
52884a7692
4 changed files with 10 additions and 12 deletions
|
|
@ -272,7 +272,7 @@ X-LINPHONE-ACCOUNT-DTMF-PROTOCOL:'.$this->dtmf_protocol;
|
|||
|
||||
foreach ($this->types as $type) {
|
||||
$vcard .= '
|
||||
X-LINPHONE-ACCOUNT-TYPE:'.$type;
|
||||
X-LINPHONE-ACCOUNT-TYPE:'.$type->key;
|
||||
}
|
||||
|
||||
foreach ($this->actions as $action) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class AccountFactory extends Factory
|
|||
'confirmation_key' => Str::random(WebAuthenticateController::$emailCodeSize),
|
||||
'ip_address' => $this->faker->ipv4,
|
||||
'creation_time' => $this->faker->dateTime,
|
||||
'dtmf_protocol' => Account::$dtmfProtocols[array_rand(Account::$dtmfProtocols)],
|
||||
'dtmf_protocol' => array_rand(Account::$dtmfProtocols),
|
||||
'activated' => true
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ class AccountContactTest extends TestCase
|
|||
$typeKey = 'phone';
|
||||
$actionKey = '123';
|
||||
$actionCode = '123';
|
||||
$actionProtocol = 'sipinfo';
|
||||
|
||||
$admin = Admin::factory()->create();
|
||||
$admin->account->generateApiKey();
|
||||
|
|
@ -78,8 +77,7 @@ class AccountContactTest extends TestCase
|
|||
$this->keyAuthenticated($admin->account)
|
||||
->json($this->method, $this->route.'/'.$password2->account->id.'/actions', [
|
||||
'key' => $actionKey,
|
||||
'code' => $actionCode,
|
||||
'protocol' => $actionProtocol
|
||||
'code' => $actionCode
|
||||
]);
|
||||
|
||||
// Retry
|
||||
|
|
@ -120,16 +118,16 @@ class AccountContactTest extends TestCase
|
|||
$this->keyAuthenticated($password1->account)
|
||||
->get('/contacts/vcard')
|
||||
->assertStatus(200)
|
||||
->assertSeeText($typeKey)
|
||||
->assertSeeText($password2->dtmf_protocol)
|
||||
->assertSeeText($actionKey.';'.$actionCode);
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-TYPE:".$typeKey)
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-DTMF-PROTOCOL:".$password2->dtmf_protocol)
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-ACTION:".$actionKey.';'.$actionCode);
|
||||
|
||||
$this->keyAuthenticated($password1->account)
|
||||
->get('/contacts/vcard/'.$password2->account->identifier)
|
||||
->assertStatus(200)
|
||||
->assertSeeText($typeKey)
|
||||
->assertSeeText($password2->dtmf_protocol)
|
||||
->assertSeeText($actionKey.';'.$actionCode);
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-TYPE:".$typeKey)
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-DTMF-PROTOCOL:".$password2->dtmf_protocol)
|
||||
->assertSeeText("X-LINPHONE-ACCOUNT-ACTION:".$actionKey.';'.$actionCode);
|
||||
|
||||
$this->keyAuthenticated($password1->account)
|
||||
->get($this->route.'/me/contacts/'.$password2->account->identifier)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#%define _datadir %{_datarootdir}
|
||||
#%define _docdir %{_datadir}/doc
|
||||
|
||||
%define build_number 126
|
||||
%define build_number 127
|
||||
%define var_dir /var/opt/belledonne-communications
|
||||
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue