summaryrefslogtreecommitdiff
path: root/features/steps/shared/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/shared/user.rb')
-rw-r--r--features/steps/shared/user.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/features/steps/shared/user.rb b/features/steps/shared/user.rb
new file mode 100644
index 00000000000..a2bf069a114
--- /dev/null
+++ b/features/steps/shared/user.rb
@@ -0,0 +1,11 @@
+module SharedUser
+ include Spinach::DSL
+
+ step 'Create user "John Doe"' do
+ create(:user, name: "John Doe", username: "john_doe")
+ end
+
+ step 'I sign in as "John Doe"' do
+ login_with(User.find_by(name: "John Doe"))
+ end
+end