How to test imports #3148
Unanswered
LarryBarker
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I saw this test in another comment, is this your actual test? Or is this simplified and is the import inside a controller? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Sure I understand what you mean. I guess I need some direction on what to
test exactly. The controller?
…On Thu, May 6, 2021 at 10:20 AM Patrick Brouwers ***@***.***> wrote:
That doesn't really seem like a valuable test to me. You basically are
testing if the testing helper works now. None of the logic within the
export is tested this way.
It's like queue fakes, the job itself isn't executed; you only test if it
was dispatched correctly.
Depending on what you want to exactly test a different type of test will
be more useful.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3148 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3HK7B7POBNKIA3SAEX3B3TMKXVVANCNFSM44GGVUFA>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, we are using the package to import users into our system. Our import class creates a new model using the
toRow()
method. The controller simply uses theimport()
method:What's interesting is I don't think the import is being stored on the file system. We are just pulling data from it and creating records.
I have tried testing based on the documentation and all I'm getting is that the file doesn't exist on the file system.
I also found an issue that reported an error with using
UploadedFile
and undefined index error. These suggestions did not work for me either (I get the original error still).Has anyone successfully tested this scenario?
Beta Was this translation helpful? Give feedback.
All reactions