Skip to content

germsvel/scout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scout

A sample repo showcasing PhoenixTest tests.

How code was created

The code in the project was created with Phoenix generators.

The users resources use regular (non-liveview) pages and controllers. The code was generated with:

mix phx.gen.html Accounts User users name:string age:integer active_at:datetime

The posts resources use LiveView. The code was generated with:

mix phx.gen.live Timeline Post posts body:string draft:boolean published_date:date

Generated tests and PhoenixTest tests

We created counterpart tests to showcase how equivalent tests would look with PhoenixTest.

The comparison isn't 1-1 since controller tests cannot test interactivity but PhoenixTests can. That's just one of the things that makes PhoenixTest so great!

Generated PhoenixTest counterpart
UserControllerTest AccountManagementTest
PostLiveTest TimelinePostsTest

Running the tests

You can run all the tests with mix test

About

Example codebase showing PhoenixTest tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published