This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Ensure unique identifiers in fabricated objects in tests (
#3173
)
closed-social-glitch-2
Eugen Rochko
7 years ago
committed by
GitHub
parent
6c1122a1d9
commit
812fe90eca
5 changed files
with
7 additions
and
8 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
spec/fabricators/account_domain_block_fabricator.rb
+1
-1
spec/fabricators/account_fabricator.rb
+2
-3
spec/fabricators/preview_card_fabricator.rb
+1
-1
spec/fabricators/tag_fabricator.rb
+1
-1
spec/fabricators/user_fabricator.rb
+ 2
- 2
spec/fabricators/account_domain_block_fabricator.rb
View File
@ -1,4 +1,4 @@
Fabricator
(
:account_domain_block
)
do
account
_id
1
domain
"
MyString
"
;
account
domain
'example.com'
;
end
+ 1
- 1
spec/fabricators/account_fabricator.rb
View File
@ -1,4 +1,4 @@
Fabricator
(
:account
)
do
username
{
Faker
::
Internet
.
user_name
(
nil
,
%w(
_
)
)
}
username
{
sequence
(
:username
)
{
|
i
|
"
#{
Faker
::
Internet
.
user_name
(
nil
,
%w(
_
)
)
}
#{
i
}
"
}
}
last_webfingered_at
{
Time
.
now
.
utc
}
end
+ 2
- 3
spec/fabricators/preview_card_fabricator.rb
View File
@ -1,5 +1,4 @@
Fabricator
(
:preview_card
)
do
status_id
1
url
"
MyString
"
html
"
MyText
"
status
url
'http://example.com'
end
+ 1
- 1
spec/fabricators/tag_fabricator.rb
View File
@ -1,3 +1,3 @@
Fabricator
(
:tag
)
do
name
"
MyString
"
name
{
sequence
(
:hashtag
)
{
|
i
|
"
#{
Faker
::
Lorem
.
word
}
#{
i
}
"
}
}
end
+ 1
- 1
spec/fabricators/user_fabricator.rb
View File
@ -1,6 +1,6 @@
Fabricator
(
:user
)
do
account
email
{
Faker
::
Internet
.
email
}
email
{
sequence
(
:email
)
{
|
i
|
"
#{
i
}
#{
Faker
::
Internet
.
email
}
"
}
}
password
"
123456789
"
confirmed_at
{
Time
.
now
}
end
Write
Preview
Loading…
Cancel
Save