8 Matching Annotations
- Aug 2023
-
www.ruby-forum.com www.ruby-forum.com
-
I ran into the same problem and never really found a good answer via the test objects. The only solution I saw was to actually update the session via a controller. I defined a new action in one of my controllers from within test_helper (so the action does not exist when actually runnning the application). I also had to create an entry in routes. Maybe there’s a better way to update routes while testing. So from my integration test I can do the following and verfiy: assert(session[:fake].nil?, “starts empty”) v = ‘Yuck’ get ‘/user_session’, :fake => v assert_equal(v, session[:fake], “value was set”)
-
- Jun 2021
-
docs.gitlab.com docs.gitlab.com
-
These kind of tests ensure that individual parts of the application work well together, without the overhead of the actual app environment (i.e. the browser). These tests should assert at the request/response level: status code, headers, body. They’re useful to test permissions, redirections, what view is rendered etc.
-
- Mar 2021
-
trailblazer.to trailblazer.to
-
Integration tests for controllers: These Smoke tests only test the wiring between controller, operation and presentation layer.
-
- Jul 2020
-
evilmartians.com evilmartians.com
-
We mostly write integration tests, by the way—and 20% is not that bad (but can be even better).
-
- Nov 2019
-
kentcdodds.com kentcdodds.com
-
These four things lead to a near total loss in the intended utility of integrated/functional tests: as the code changes make sure nothing is broken.
-
-
kentcdodds.com kentcdodds.com
-
I should also add that I'm in favor of relying more heavily on integration testing. When you do this, you need to unit test fewer of your simple components and wind up only having to unit test edge cases for components (which can mock all they want).
-
-
testing-library.com testing-library.com
-
The more your tests resemble the way your software is used, the more confidence they can give you.
-
-
www.robinwieruch.de www.robinwieruch.de
-
For instance, an integration test could verify that all necessary props are passed through from the tested component to a specific child component.
-