jeudi 30 mars 2017

ruby on rails using fixtures

I am using fixtures in testing.

For example:

post bookings_path, params: { journal: { from_account_number: "1",
                                         from_account: "Test",
                                         from_amount: "12",
                                         to_account_number: "2",
                                         to_account: "Test2",
                                         to_amount: "12"
      } }

Is it possible to replace

from_account_number: "1",
from_account: "Test",
from_amount: "12",
to_account_number: "2",
to_account: "Test2",
to_amount: "12"

with one fixture call?

Aucun commentaire:

Enregistrer un commentaire