drhenner / ror_ecommerce

Ruby on Rails Ecommerce platform, perfect for your small business solution.
www.ror-e.com
MIT License
1.21k stars 409 forks source link

Test fail for Deal #54

Closed mitfik closed 11 years ago

mitfik commented 12 years ago

Hi

I just start working with payment system and I found one weird thing. In spec/model/deal_spec.rb few test fail because in order.rb model method:

def number_of_a_given_product_type
  ...
     return_hash.delete_if{|k,v| k == 1}  #<<< here

end

return always empty hash because there is only one type of product with id 1. what for is that? when I will just return in this method return_hash without delete_if all test pass.

deanpcmad commented 12 years ago

Hmm, odd. I'll have a look tonight.

mitfik commented 12 years ago

there is also few weird things there, tests:

53     it 'should return 10.0"' do

and

76     it 'should return 10.0"' do

both return 0.0 and test pass. So it look like that test are not correct.

deanpcmad commented 12 years ago

I'm working on changing the tests at the moment so this will be fixed :) I am also working on changing the authentication to Devise. You can see these changes on the devise branch on my fork.

On 10 Sep 2012, at 12:17, Robert Mitwicki notifications@github.com wrote:

there is also few weird things there, tests:

53 it 'should return 10.0"' do and

76 it 'should return 10.0"' do both return 0.0 and test pass. So it look like that test are not correct.

— Reply to this email directly or view it on GitHub.

drhenner commented 11 years ago

FIXED