Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
ee754269
Commit
ee754269
authored
13 years ago
by
Raphael Sofaer
Browse files
Options
Downloads
Patches
Plain Diff
Add failing spec for being overloaded with updated pending photos
parent
9aad7810
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
spec/factories.rb
+0
-4
0 additions, 4 deletions
spec/factories.rb
spec/models/user/querying_spec.rb
+8
-0
8 additions, 0 deletions
spec/models/user/querying_spec.rb
spec/spec_helper.rb
+4
-0
4 additions, 0 deletions
spec/spec_helper.rb
with
12 additions
and
4 deletions
spec/factories.rb
+
0
−
4
View file @
ee754269
...
...
@@ -75,10 +75,6 @@ Factory.define(:status_message) do |m|
end
end
Factory
.
define
:photo
do
|
p
|
p
.
image
File
.
open
(
File
.
dirname
(
__FILE__
)
+
'/fixtures/button.png'
)
end
Factory
.
define
:service
do
|
service
|
service
.
nickname
"sirrobertking"
service
.
type
"Services::Twitter"
...
...
This diff is collapsed.
Click to expand it.
spec/models/user/querying_spec.rb
+
8
−
0
View file @
ee754269
...
...
@@ -118,6 +118,14 @@ describe User do
eve
.
find_visible_post_by_id
(
@status_message1
.
id
).
should
==
@status_message1
eve
.
find_visible_post_by_id
(
@status_message5
.
id
).
should
==
nil
end
it
'is not emptied by a load of pending photos'
do
15
.
times
{
eve
.
build_post
(
:photo
,
:pending
=>
true
,
:user_file
=>
File
.
open
(
photo_fixture_name
),
:to
=>
eve
.
aspect_ids
,
:updated_at
=>
Time
.
now
+
1
.
day
).
save!
}
query
=
eve
.
visible_posts
query
.
map
{
|
p
|
p
.
id
}.
should
=~
[
@status_message1
,
@status_message2
,
@status_message3
,
@status_message4
].
map
{
|
p
|
p
.
id
}
end
end
end
...
...
This diff is collapsed.
Click to expand it.
spec/spec_helper.rb
+
4
−
0
View file @
ee754269
...
...
@@ -79,3 +79,7 @@ end
def
remote_raphael
@remote_raphael
||=
Person
.
where
(
:diaspora_handle
=>
'raphael@remote.net'
).
first
end
def
photo_fixture_name
@photo_fixture_name
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'fixtures'
,
'button.png'
)
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment