Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict;
- use warnings;
- use Pessoal;
- use Test::More;
- use DDP;
- use utf8;
- my $app = Pessoal->new;
- my $familia = $app->familia->create(
- {
- familia => { nome => 'CHAVES' },
- fonte_renda => [{
- nome => "ROSELENA Chaves",
- cpf => 'xxxxxxxxxx',
- endereco => 'RUA FOO BAR N 54',
- cep => '65000000',
- cidade => 'SÃO LUÍS',
- uf => 'MA',
- telefone => '9999999',
- }],
- usuario => {
- usuario => 'MATHEUSLAILTON DE OLIVEIRA CHAVES',
- senha => 'perl',
- email => 'matheus@tchaves.com.br',
- }
- }
- );
- ok defined $familia->id, "registrou um id";
- ok defined $familia->nome, "registrou uma nova família";
- ok $familia->id > 0;
- ok $app->familia->list->count > 0;
- my $novo_nome = "Família Tchaves";
- $app->familia->update($familia->id, {nome => $novo_nome});
- ok $app->familia->get($familia->id)->nome eq $novo_nome;
- done_testing;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement