about summary refs log tree commit diff
path: root/spec/fabricators
diff options
context:
space:
mode:
authorSamy KACIMI <samy.kacimi@gmail.com>2017-04-05 00:29:56 +0200
committerSamy KACIMI <samy.kacimi@gmail.com>2017-04-05 00:29:56 +0200
commit81c76fe375d9342e5a436db05c8e25305c650e8d (patch)
tree9d81c36f8745de3d5ab8827a82a14be369f0d23e /spec/fabricators
parent6fd865c0004efbf11ee87c06fea9f48af567fabe (diff)
add more tests to models
Diffstat (limited to 'spec/fabricators')
-rw-r--r--spec/fabricators/account_fabricator.rb2
-rw-r--r--spec/fabricators/block_fabricator.rb3
-rw-r--r--spec/fabricators/follow_fabricator.rb3
-rw-r--r--spec/fabricators/follow_request_fabricator.rb3
-rw-r--r--spec/fabricators/mention_fabricator.rb4
-rw-r--r--spec/fabricators/user_fabricator.rb2
6 files changed, 12 insertions, 5 deletions
diff --git a/spec/fabricators/account_fabricator.rb b/spec/fabricators/account_fabricator.rb
index 3a7c00bf5..567de05f4 100644
--- a/spec/fabricators/account_fabricator.rb
+++ b/spec/fabricators/account_fabricator.rb
@@ -1,3 +1,3 @@
 Fabricator(:account) do
-  username "alice"
+  username { Faker::Internet.user_name(nil, %w(_)) }
 end
diff --git a/spec/fabricators/block_fabricator.rb b/spec/fabricators/block_fabricator.rb
index 9a5a6808f..379931ba6 100644
--- a/spec/fabricators/block_fabricator.rb
+++ b/spec/fabricators/block_fabricator.rb
@@ -1,3 +1,4 @@
 Fabricator(:block) do
-
+  account
+  target_account { Fabricate(:account) }
 end
diff --git a/spec/fabricators/follow_fabricator.rb b/spec/fabricators/follow_fabricator.rb
index 9d9d06f12..9b25dc547 100644
--- a/spec/fabricators/follow_fabricator.rb
+++ b/spec/fabricators/follow_fabricator.rb
@@ -1,3 +1,4 @@
 Fabricator(:follow) do
-
+  account
+  target_account { Fabricate(:account) }
 end
diff --git a/spec/fabricators/follow_request_fabricator.rb b/spec/fabricators/follow_request_fabricator.rb
index 9c3733cef..78a057919 100644
--- a/spec/fabricators/follow_request_fabricator.rb
+++ b/spec/fabricators/follow_request_fabricator.rb
@@ -1,3 +1,4 @@
 Fabricator(:follow_request) do
-
+  account
+  target_account { Fabricate(:account) }
 end
diff --git a/spec/fabricators/mention_fabricator.rb b/spec/fabricators/mention_fabricator.rb
new file mode 100644
index 000000000..cb5fe4299
--- /dev/null
+++ b/spec/fabricators/mention_fabricator.rb
@@ -0,0 +1,4 @@
+Fabricator(:mention) do
+  account
+  status
+end
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
index c08559137..16b3b1f6f 100644
--- a/spec/fabricators/user_fabricator.rb
+++ b/spec/fabricators/user_fabricator.rb
@@ -1,6 +1,6 @@
 Fabricator(:user) do
   account
-  email        "alice@example.com"
+  email        { Faker::Internet.email }
   password     "123456789"
   confirmed_at { Time.now }
 end