lundi 28 décembre 2015

Unknown primary key for table report_merge_holders in model

 require 'test_helper'

 class GenerateReportControllerTest < ActionController::TestCase

 setup do
  @client = clients(:one)    
  @results = report_merge_holders(:one)
 end

In `fixtures/report_merge_holders.yml`:
   one:
    id: 1
    client_id: "1"
    FOLIO_NO: "12323"

In `fixtures/clients.yml`:
   one:
    id: 1
    isin_number: "SDS232"
    code: "232DD"
    name: "KJHSFDKJ"

I am new in "unit-testing".I want to set "client_id" to 1.I am getting error like "ActiveRecord::UnknownPrimaryKey: Unknown primary key for table report_merge_holders in model ReportMergeHolder".Please help me out.

Aucun commentaire:

Enregistrer un commentaire