Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

Commit

Permalink
Adds test for encrypted field type
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Waters authored and Andrew Waters committed Dec 14, 2015
1 parent 248cdf4 commit ae3abf1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/FlowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ public function test_email_type()
$this->assertEquals('<input name="email" id="email" class="form-control" data-fieldtype="email" type="email" />', $flow['input']);
}

public function test_encrypted_type()
{
$field = array(
'name' => 'Password',
'slug' => 'password',
'type' => 'encrypted',
'options' => array(),
'required' => false,
);

$flow = $this->newBuiltFlowTypeFromField($field);

$this->assertEquals($field['name'], $flow['name']);
$this->assertEquals($field['slug'], $flow['slug']);
$this->assertEquals($field['type'], $flow['type']);
$this->assertEquals($field['options'], $flow['options']);
$this->assertEquals($field['required'], $flow['required']);

$this->assertEquals('<input name="password" id="password" class="form-control" data-fieldtype="encrypted" type="password" />', $flow['input']);
}

public function test_slug_type()
{
$field = array(
Expand Down

0 comments on commit ae3abf1

Please sign in to comment.