From 8c722585765f0bb1dafd5658738f7e2c42b9111d Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 1 Dec 2021 21:35:42 +0000 Subject: [PATCH] Write a failing spec for user creation --- spec/features/organisation_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/features/organisation_spec.rb b/spec/features/organisation_spec.rb index afd9ee7ca..ceeea1eaf 100644 --- a/spec/features/organisation_spec.rb +++ b/spec/features/organisation_spec.rb @@ -34,6 +34,9 @@ RSpec.describe "User Features" do click_link("Invite user") expect(page).to have_current_path("/users/new") expect(page).to have_content("Invite user to submit CORE data") + fill_in("user[name]", with: "New User") + fill_in("user[email]", with: "new_user@example.com") + expect { click_button("Continue") }.to change { ActionMailer::Base.deliveries.count }.by(1) end end end