[BUG/REGRESSION] Injecting autogenerated controllers doesn't work in acceptance tests
See original GitHub issueREPRODUCTION: https://github.com/cibernox/demo-inject-problem
- Clone and
yarn
- Run the tests
- Expected error:
Attempting to inject an unknown injection: ‘controller:application’
Apparently this only happens in tests. During normal execution it works. It also works if instead of injecting an autogenerated controller you create an empty application controller.
It works in 2.13 but fails in 2.14-beta and canary.
/cc @rwjblue As discussed in slack ^
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Unable to run tests because Nest can't resolve dependencies ...
Current behavior. I have followed the unit test example but I am unable to get my very simple test to run (it's literally...
Read more >Best practices for writing unit tests - .NET - Microsoft Learn
Learn best practices for writing unit tests that drive code quality and resilience for .NET Core and .NET Standard projects.
Read more >Unit test to ensure all required services are added to the .Net ...
Find all controllers through reflection, and try to construct them the same way MVC does - by getting dependent services from the DI...
Read more >The Practical Test Pyramid - Martin Fowler
Automating their tests allows teams to know whether their software is broken in a matter of seconds and minutes instead of days and...
Read more >Five Common Problems With your Regression Testing Strategy
Regression testing involves testing existing software to verify that working features are not broken by new development work. Regression testing is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got bitten by this in my app today. It happened outside of the test environment. The workaround of generating a concrete controller worked but it feels like controller injection should work with autogenerated controllers.
@djones
ember generate controller application
should work around the issue.