profile
viewpoint
Aaron Renner aaronrenner @Boulevard Bayfield, CO https://aaronrenner.io/ Elixir engineer

aaronrenner/crowdfundr 36

Example crowdfunding app for ElixirConf

aaronrenner/constantizer 8

Helpers to evaluate elixir functions at compile time instead of runtime

aaronrenner/chef-cookbooks 1

Chef cookbook repo

aaronrenner/counter_culture 1

Turbo-charged counter caches for your Rails app.

aaronrenner/actions 0

Automate your GitHub workflows using Azure Actions

aaronrenner/active_model_serializers 0

ActiveModel::Serializer implementation and Rails hooks

aaronrenner/active_node 0

ActiveRecord style Object Graph Mapping for neo4j

aaronrenner/active_record_immutable 0

Make ActiveRecord objects immutable.

aaronrenner/acts_as_tenant 0

Easy multi-tenancy for Rails in a shared database setup

aaronrenner/angular-bugsnag 0

Angular wrapper for Bugsnag

startedlawik/pubd

started time in 3 hours

startedaaronrenner/phx_gen_auth

started time in 4 hours

issue commentelixir-wallaby/wallaby

DBConnection.OwnershipError error in async tests (using LiveView)

At the opened issue on LiveView, there is a comment in which José talks about setting the test to be async false, and further a new integration facililty to help test LiveView, so you could use that instead of Wallaby when testing LV

bartblast

comment created time in 8 hours

startedsabiwara/aja

started time in 9 hours

startedaaronrenner/heroku-buildpack-rgeo-prep

started time in a day

startedaesmail/kaffy

started time in a day

created repositorykeathley/sync_dispatch

created time in a day

startedrclone/rclone

started time in a day

PR opened aaronrenner/phx_gen_auth

Fixed a typo
+1 -1

0 comment

1 changed file

pr created time in a day

fork adamtew/phx_gen_auth

An authentication system generator for Phoenix 1.5 applications.

fork in a day

created repositoryjjcarstens/disc_golf

created time in 2 days

startedaaronrenner/phx_gen_auth

started time in 2 days

startedplausible/analytics

started time in 2 days

startedseancribbs/datalog-elixir

started time in 2 days

startedaaronrenner/phx_gen_auth

started time in 2 days

startedaaronrenner/phx_gen_auth

started time in 2 days

issue commentaaronrenner/phx_gen_auth

Create tests that are adaptable

I agree with you that your way of doing things work but:

  • As a new user, I get 90 errors if I add a name to a user because every test that supposes that the only valid fields are user and password will fail. It is not only to create the fixture, but on user registration you are hardcoding the fields needed, user and password, while my model has 7.
  • I needed to perform a code review to understand why and modify a good portion of the list of tests. It took make time to do so, and then I needed to add my own tests for name, surname, telephone, etc. It is not a daunting task, but still I believe is easier to extend the tests when you start from a fully valid user attibutes list.

With the valid_user_attributes, I have a way to control what is going on. You can create the user directly, but it makes it easier to understand what is going on: I have valid attributes, I modify one of them for the test (nil, valid, or invalid), I try to create or update the user, see the results and test what happens with the original values. Actually, it allows me to use fixture generators (my phone numbers or names are different every time I create a user, so there is a chance I catch more errors). And all of that without needing to change my tests when I add a new field (all my tests will still be valid, even if I don't assert the new fields).

chargio

comment created time in 3 days

startedaaronrenner/phx_gen_auth

started time in 3 days

startedaaronrenner/formtacular

started time in 3 days

startedaaronrenner/phx_gen_auth

started time in 3 days

startedseancribbs/datalog-elixir

started time in 3 days

fork michallepicki/fika

A statically typed functional programming language for the web.

fork in 3 days

startedmnishiguchi/lcd_display

started time in 3 days

starteddallagi/excontainers

started time in 3 days

startedaaronrenner/phx_gen_auth

started time in 3 days

startedfika-lang/fika

started time in 4 days

startedaaronrenner/phx_gen_auth

started time in 4 days

startedaaronrenner/phx_gen_auth

started time in 5 days

fork fhunleth/zigler

zig nifs in elixir

fork in 5 days

startedelbow-jason/css_prop

started time in 5 days

more