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
43dd9514
Valider
43dd9514
rédigé
il y a 14 ans
par
Raphael
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Starting to remove database-cleaner
parent
b007ba14
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
spec/lib/diaspora_parser_spec.rb
+2
-2
2 ajouts, 2 suppressions
spec/lib/diaspora_parser_spec.rb
spec/misc_spec.rb
+1
-22
1 ajout, 22 suppressions
spec/misc_spec.rb
spec/models/comments_spec.rb
+3
-3
3 ajouts, 3 suppressions
spec/models/comments_spec.rb
spec/spec_helper.rb
+1
-6
1 ajout, 6 suppressions
spec/spec_helper.rb
avec
7 ajouts
et
33 suppressions
spec/lib/diaspora_parser_spec.rb
+
2
−
2
Voir le fichier @
43dd9514
...
@@ -6,7 +6,7 @@ require 'spec_helper'
...
@@ -6,7 +6,7 @@ require 'spec_helper'
describe
Diaspora
::
Parser
do
describe
Diaspora
::
Parser
do
before
do
before
do
@user
=
Factory
.
create
(
:user
,
:email
=>
"bob@aol.com"
)
@user
=
Factory
.
create
(
:user
)
@aspect
=
@user
.
aspect
(
:name
=>
'spies'
)
@aspect
=
@user
.
aspect
(
:name
=>
'spies'
)
@user3
=
Factory
.
create
:user
@user3
=
Factory
.
create
:user
...
@@ -20,7 +20,7 @@ describe Diaspora::Parser do
...
@@ -20,7 +20,7 @@ describe Diaspora::Parser do
end
end
it
'should be able to correctly handle comments with person in db'
do
it
'should be able to correctly handle comments with person in db'
do
person
=
Factory
.
create
(
:person
,
:diaspora_handle
=>
"test@testing.com"
)
person
=
Factory
.
create
(
:person
)
post
=
Factory
.
create
(
:status_message
,
:person
=>
@user
.
person
)
post
=
Factory
.
create
(
:status_message
,
:person
=>
@user
.
person
)
comment
=
Factory
.
build
(
:comment
,
:post
=>
post
,
:person
=>
person
,
:text
=>
"Freedom!"
)
comment
=
Factory
.
build
(
:comment
,
:post
=>
post
,
:person
=>
person
,
:text
=>
"Freedom!"
)
xml
=
comment
.
to_diaspora_xml
xml
=
comment
.
to_diaspora_xml
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
spec/misc_spec.rb
+
1
−
22
Voir le fichier @
43dd9514
...
@@ -5,34 +5,13 @@
...
@@ -5,34 +5,13 @@
require
'spec_helper'
require
'spec_helper'
describe
'making sure the spec runner works'
do
describe
'making sure the spec runner works'
do
it
'should not delete the database mid-spec'
do
User
.
count
.
should
==
0
Factory
.
create
(
:user
)
User
.
count
.
should
==
1
end
it
'should make sure the last user no longer exsists'
do
User
.
count
.
should
==
0
end
it
'should factory create a user with a person saved'
do
it
'should factory create a user with a person saved'
do
user
=
Factory
.
create
(
:user
)
user
=
Factory
.
create
(
:user
)
loaded_user
=
User
.
first
(
:id
=>
user
.
id
)
loaded_user
=
User
.
first
(
:id
=>
user
.
id
)
loaded_user
.
person
.
owner_id
.
should
==
user
.
id
loaded_user
.
person
.
owner_id
.
should
==
user
.
id
end
end
describe
'testing a before do block'
do
before
do
Factory
.
create
(
:user
)
end
describe
'#friend_users'
do
it
'should have cleaned before the before do block runs'
do
User
.
count
.
should
==
1
end
end
describe
'#friend_users'
do
before
do
before
do
@user1
=
Factory
.
create
(
:user
)
@user1
=
Factory
.
create
(
:user
)
@aspect1
=
@user1
.
aspect
(
:name
=>
"losers"
)
@aspect1
=
@user1
.
aspect
(
:name
=>
"losers"
)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
spec/models/comments_spec.rb
+
3
−
3
Voir le fichier @
43dd9514
...
@@ -18,7 +18,7 @@ describe Comment do
...
@@ -18,7 +18,7 @@ describe Comment do
status
.
comments
.
should
==
[]
status
.
comments
.
should
==
[]
@user
.
comment
"Yeah, it was great"
,
:on
=>
status
@user
.
comment
"Yeah, it was great"
,
:on
=>
status
S
tatus
Message
.
first
.
comments
.
first
.
text
.
should
==
"Yeah, it was great"
s
tatus
.
reload
.
comments
.
first
.
text
.
should
==
"Yeah, it was great"
end
end
it
"should be able to comment on a person's status"
do
it
"should be able to comment on a person's status"
do
...
@@ -26,8 +26,8 @@ describe Comment do
...
@@ -26,8 +26,8 @@ describe Comment do
status
=
Factory
.
create
(
:status_message
,
:person
=>
person
)
status
=
Factory
.
create
(
:status_message
,
:person
=>
person
)
@user
.
comment
"sup dog"
,
:on
=>
status
@user
.
comment
"sup dog"
,
:on
=>
status
S
tatus
Message
.
first
.
comments
.
first
.
text
.
should
==
"sup dog"
s
tatus
.
reload
.
comments
.
first
.
text
.
should
==
"sup dog"
S
tatus
Message
.
first
.
comments
.
first
.
person
.
should
==
@user
.
person
s
tatus
.
reload
.
comments
.
first
.
person
.
should
==
@user
.
person
end
end
it
'should not send out comments when we have no people'
do
it
'should not send out comments when we have no people'
do
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
spec/spec_helper.rb
+
1
−
6
Voir le fichier @
43dd9514
...
@@ -27,19 +27,14 @@ RSpec.configure do |config|
...
@@ -27,19 +27,14 @@ RSpec.configure do |config|
config
.
before
(
:suite
)
do
config
.
before
(
:suite
)
do
DatabaseCleaner
.
clean_with
(
:truncation
)
DatabaseCleaner
.
clean_with
(
:truncation
)
DatabaseCleaner
.
clean
stub_signature_verification
stub_signature_verification
end
end
config
.
before
(
:each
)
do
config
.
before
(
:each
)
do
DatabaseCleaner
.
start
stub_sockets
stub_sockets
User
.
stub!
(
:allowed_email?
).
and_return
(
:true
)
User
.
stub!
(
:allowed_email?
).
and_return
(
:true
)
end
end
config
.
after
(
:each
)
do
DatabaseCleaner
.
clean
end
end
end
ImageUploader
.
enable_processing
=
false
ImageUploader
.
enable_processing
=
false
...
...
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