seixasfelipe / cleaners

Cleaners - Management Application
MIT License
2 stars 0 forks source link

Continuing on orders-crud #41

Closed fraga closed 11 years ago

fraga commented 11 years ago

Continuing evaluating the relation on the orders and vehicle

fraga commented 11 years ago

That's all I could do guys, that's all I know =)

Let me know what you think, I still have 1 failing test:

Failures:

  1) Navigating on order views and editing one result
     Failure/Error: expect(page).to have_content "21/01/2033"
       expected there to be text "21/01/2033" in "Olá, Name_4 (Sair) Início Servicos Novo Listar Serviço Listar Item Clientes Novo Listar Cliente Listar Veículo Resumo Geral Financeiro × Serviço atualizado(a) com sucesso. Todos os Serviços Buscar Criar Serviço Id Data Total Status 001 2013-01-21 false Editar Remover © Cleaners 2013"
     # ./spec/features/order_spec.rb:41:in `block (2 levels) in <top (required)>'

Finished in 2.39 seconds
5 examples, 1 failure

Failed examples:

rspec ./spec/features/order_spec.rb:32 # Navigating on order views and editing one result
fraga commented 11 years ago

Oops, two failing tests:

Failures:

  1) Order when receiving nil params as #vehicle
     Failure/Error: expect(order).not_to be_valid
       expected #<Order id: nil, order_date: "-4712-01-01 00:00:00", closed: false, value: #<BigDecimal:7ffda363b8e0,'0.5E2',9(45)>, vehicle_id: 5, created_at: nil, updated_at: nil> not to be valid
     # ./spec/models/order_spec.rb:26:in `block (3 levels) in <top (required)>'

  2) Navigating on order views and editing one result
     Failure/Error: expect(page).to have_content "21/01/2033"
       expected there to be text "21/01/2033" in "Olá, Name_116 (Sair) Início Servicos Novo Listar Serviço Listar Item Clientes Novo Listar Cliente Listar Veículo Resumo Geral Financeiro × Serviço atualizado(a) com sucesso. Todos os Serviços Buscar Criar Serviço Id Data Total Status 001 2013-01-21 false Editar Remover © Cleaners 2013"
     # ./spec/features/order_spec.rb:41:in `block (2 levels) in <top (required)>'

Finished in 11.82 seconds
73 examples, 2 failures
fabianoalmeida commented 11 years ago

Wow! That's nice @fraga. By the way, I made some comments. :wink:

fraga commented 11 years ago

Reverting this commit gives me 5 failing tests now

fabianoalmeida commented 11 years ago

That's it. :laughing: Fix it and commit again.

fraga commented 11 years ago

I'm not sure how to fix this now, inverting the relation as you told me?

fabianoalmeida commented 11 years ago

@fraga, sorry by delay. I think this is the best way to see the logical business as it is, having the relationship as I mentioned.

fabianoalmeida commented 11 years ago

I'm missing something or this PR is merging in the wrong place? @fraga is committing in orders-crud branch? Is this correct? Should not be the master branch?

fraga commented 11 years ago

It's ok @fabianoalmeida, we didn't want to commit broken tests in master

fabianoalmeida commented 11 years ago

Great! Thanks.