view · edit · sidebar · attach · print · history

20110418-testcases-oddb_org-view-narcotiv-ddd-product-publictemplate-limit-state-checkout-limit

<< | Index | >>


  1. Update testcases

Goal/Estimate/Evaluation
  • Testcases / 84% / 84.16%
Milestones
  • Update testcases
    1. src/state/paypal/checkout.rb (coverage: 100%) 9:00
    2. src/view/drugs/narcotic.rb (coverage: 100%) 10:00
    3. src/view/drugs/ddd.rb (coverage: 100%) 11:00
    4. src/view/migel/product.rb (coverage: 100%) 11:40
    5. src/view/publictemplate.rb (coverage: 91.11%) 14:30
    6. src/state/admin/fachinfoconfirm.rb (coverage: 95.52%) 16:00
    7. src/view/limit.rb (coverage: 100%) 16:30
    8. src/view/notify.rb (coverage: 70.99%)
Summary
Commits

Memo (src/state/admin/fachinfoconfirm.rb)

update method

      values = {}
      values.store(@language, @model.at(0))
      if(values.empty?)
        add_warning(:w_no_fachinfo_saved, :fachinfo_upload, nil)
        return self
      end

Note

  • This 'values' Hash never becomes 'empty? == true', because some value certainly is set one line before it

validate_iksnrs method

  def validate_iksnrs
    @valid_iksnrs = [@model.registration.iksnr]
    @errors = {}
    all_iksnrs = @model.inject([]) { |array, fi_document|
      array | iksnrs(fi_document)
    }
    all_iksnrs.each { |iksnr|
      if(reg = @session.app.registration(iksnr))
        if(allowed?(reg))
          @valid_iksnrs.push(iksnr)
        else
          add_warning(:w_access_denied_iksnr, :fachinfo_upload, iksnr)
        end
      else
        add_warning(:w_unknown_iksnr, :fachinfo_upload, iksnr)
      end
    }
    if(@valid_iksnrs.empty?)
      err = create_error(:e_no_valid_iksnrs, :iksnrs, all_iksnrs)
      @errors.store(:iksnrs, err)
    end
    @valid_iksnrs
  end

Note

  • This @valid_iksnrs also never becomes 'empty? == true', because '@valid_iksnrs' is set at the top of this method

Memo (src/view/publictemplate.rb)

Note

           headers << context.script('type' => 'text/javascript') do
             <<-EOS
dojo.addOnLoad(function(){
 setTimeout(function(){
   dojo.require("dojox.analytics.Urchin")
   dojo.addOnLoad(function(){
     var tracker = new dojox.analytics.Urchin({
       acct: "UA-115196-1"
     })
   })
 }, 100)
})
             EOS
view · edit · sidebar · attach · print · history
Page last modified on April 20, 2011, at 10:38 AM