Test Smells

Flashcard 2 of 5

The following pseudocode shows up in a PR, what change might you (nicely) suggest?

feature do
  scenario do
    setup_some_things

    promote_user_to_admin
    attempt_to_visit_admin_dashboard

    expect_to_be_on_admin_dashboard

    attempt_to_perform_privileged_operation

    expect_operation_to_have_succeeded
  end
end

Answer:

Reveal Answer