Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
parlote-facil
Validations
6e6a5c1e
Valider
6e6a5c1e
rédigé
9 years ago
par
Steffen van Bergerem
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Move multiple participations test to rspec
parent
6ef4345d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
features/desktop/activity_stream.feature
+0
-32
0 ajout, 32 suppressions
features/desktop/activity_stream.feature
spec/lib/evil_query_spec.rb
+25
-0
25 ajouts, 0 suppression
spec/lib/evil_query_spec.rb
avec
25 ajouts
et
32 suppressions
features/desktop/activity_stream.feature
+
0
−
32
Voir le fichier @
6e6a5c1e
...
...
@@ -41,35 +41,3 @@ Feature: The activity stream
And
I unlike the post
"Look at this dog"
in the stream
And
I go to the activity stream page
Then
I should not see
"Look at this dog"
Scenario
:
multiple participations
When
I sign in as
"bob@bob.bob"
And
I am on
"alice@alice.alice"
's page
Then
I should see
"Look at this dog"
When
I like the post
"Look at this dog"
in the stream
And
I go to the activity stream page
Then
I should see
"Look at this dog"
When
I am on
"alice@alice.alice"
's page
Then
I should see
"Look at this dog"
When
I focus the comment field
And I fill in the following
:
|
text
|
is
that
a
poodle?
|
And
I
press
"Comment"
And
I go to the activity stream page
Then
I should see
"Look at this dog"
When
I am on
"alice@alice.alice"
's page
And
I unlike the post
"Look at this dog"
in the stream
And
I go to the activity stream page
Then
I should see
"Look at this dog"
When
I am on
"alice@alice.alice"
's page
And
I click to delete the first comment
And
I confirm the alert
And
I go to the activity stream page
Then
I should not see
"Look at this dog"
Ce diff est replié.
Cliquez pour l'agrandir.
spec/lib/evil_query_spec.rb
+
25
−
0
Voir le fichier @
6e6a5c1e
...
...
@@ -65,4 +65,29 @@ describe EvilQuery::Participation do
expect
(
posts
.
map
(
&
:id
)).
to
eq
([
@status_messageE
.
id
,
@status_messageA
.
id
,
@status_messageB
.
id
])
end
end
describe
"multiple participations"
do
before
do
@status_message
=
FactoryGirl
.
create
(
:status_message
,
author:
bob
.
person
)
@like
=
alice
.
like!
(
@status_message
)
@comment
=
alice
.
comment!
(
@status_message
,
"party"
)
end
let
(
:posts
)
{
EvilQuery
::
Participation
.
new
(
alice
).
posts
}
it
"includes Posts with multiple participations"
do
expect
(
posts
.
map
(
&
:id
)).
to
eq
([
@status_message
.
id
])
end
it
"includes Posts with multiple participation after removing one participation"
do
@like
.
destroy
expect
(
posts
.
map
(
&
:id
)).
to
eq
([
@status_message
.
id
])
end
it
"doesn't includes Posts after removing all of their participations"
do
@like
.
destroy
@comment
.
destroy
expect
(
posts
.
map
(
&
:id
)).
not_to
include
(
@status_message
.
id
)
end
end
end
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter