Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-10091

NoMethodError: undefined method `credit_card_expiration_year' for Account

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • System
    • None
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      Trying to update credit card without expiration year results in error:

      NoMethodError: undefined method `credit_card_expiration_year' for #<Account:0x00000000123c5840>
      

      Replicate locally with this test case:

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      diff --git a/test/functional/admin/api/credit_cards_controller_test.rb b/test/functional/admin/api/credit_cards_controller_test.rb
      index 77a16b709..51bd1322a 100644
      --- a/test/functional/admin/api/credit_cards_controller_test.rb
      +++ b/test/functional/admin/api/credit_cards_controller_test.rb
      @@ -48,6 +48,13 @@ class Admin::Api::CreditCardsControllerTest < ActionController::TestCase
           assert_equal '2025-03-01', @buyer.reload.credit_card_expires_on.to_s
         end
       
      +  test"blank expiration year" do
      +    @params[:credit_card_expiration_year] = ''
      +
      +    put :update, params: @params
      +    assert_response :success
      +  end
      +
         def test_delete
           delete :destroy, params: { id: @buyer.provider_account_id, account_id: @buyer.id, format: :xml, access_token: @token }
           assert_response :success
      

      There might be also other required parameters that may result in an error if not present. Probably have to try all of them.

              Unassigned Unassigned
              akostadi1@redhat.com Aleksandar Kostadinov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: