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
e45278a0
Commit
e45278a0
authored
13 years ago
by
Ilyaaaaaaaaaaaaa Zhitomirskiy
Browse files
Options
Downloads
Patches
Plain Diff
notification for reshares WIP
parent
31733e1f
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
features/notifications.feature
+20
-2
20 additions, 2 deletions
features/notifications.feature
features/reshare.feature
+0
-0
0 additions, 0 deletions
features/reshare.feature
spec/models/reshare_spec.rb
+13
-0
13 additions, 0 deletions
spec/models/reshare_spec.rb
with
33 additions
and
2 deletions
features/notifications.feature
+
20
−
2
View file @
e45278a0
...
...
@@ -8,11 +8,11 @@ Feature: Notifications
Given
a user with email
"bob@bob.bob"
And
a user with email
"alice@alice.alice"
When
I sign in as
"bob@bob.bob"
Scenario
:
someone shares with me
And
I am on
"alice@alice.alice"
's page
And
I add the person to my 1st aspect
And
I go to the destroy user session page
Scenario
:
someone shares with me
When
I sign in as
"alice@alice.alice"
And
I follow
"notifications"
in the header
And
I wait for the ajax to finish
...
...
@@ -20,3 +20,21 @@ Feature: Notifications
Then
I should see
"started sharing with you"
When
I follow
"View all"
Then
I should see
"started sharing with you"
Scenario
:
someone re-shares my post
And
a user with email
"bob@bob.bob"
is connected with
"alice@alice.alice"
And
"alice@alice.alice"
has a public post with text
"reshare this!"
And
I am on
"alice@alice.alice"
's page
And
I preemptively confirm the alert
And
I follow
"Reshare"
And
I wait for the ajax to finish
And
I go to the destroy user session page
When
I sign in as
"alice@alice.alice"
And
I follow
"notifications"
in the header
And
I wait for the ajax to finish
Then
the notification dropdown should be visible
Then
I should see
"reshared your post"
When
I follow
"View all"
Then
I should see
"reshared your post"
This diff is collapsed.
Click to expand it.
features/re
post
.feature
→
features/re
share
.feature
+
0
−
0
View file @
e45278a0
File moved
This diff is collapsed.
Click to expand it.
spec/models/reshare_spec.rb
+
13
−
0
View file @
e45278a0
...
...
@@ -51,6 +51,19 @@ describe Reshare do
end
end
describe
'#notification_type'
do
before
do
@reshare
=
Factory
.
create
(
:reshare
,
:author
=>
alice
.
person
)
end
it
'does not return anything for the author'
do
@reshare
.
notification_type
(
bob
,
@reshare
.
author
).
should
be_nil
end
it
'returns private mesage for an actual receiver'
do
@reshare
.
notification_type
(
alice
,
@reshare
.
author
).
should
==
Notifications
::
PrivateMessage
end
end
describe
"XML"
do
before
do
@reshare
=
Factory
(
:reshare
)
...
...
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