Skip to content
Extraits de code Groupes Projets
Valider cff3f6ea rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

green specs

parent 06ad78f0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -67,7 +67,7 @@ describe RegistrationsController do ...@@ -67,7 +67,7 @@ describe RegistrationsController do
it "redirects to the home path" do it "redirects to the home path" do
get :create, @valid_params get :create, @valid_params
response.should be_redirect response.should be_redirect
response.location.should match /^#{aspects_url}\??$/ response.location.should match /^#{multi_url}\??$/
end end
end end
......
...@@ -24,17 +24,17 @@ describe SessionsController do ...@@ -24,17 +24,17 @@ describe SessionsController do
end end
describe "#create" do describe "#create" do
it "redirects to /aspects for a non-mobile user" do it "redirects to /stream for a non-mobile user" do
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
response.should be_redirect response.should be_redirect
response.location.should match /^#{aspects_url}\??$/ response.location.should match /^#{multi_url}\??$/
end end
it "redirects to /aspects for a mobile user" do it "redirects to /stream for a mobile user" do
@request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7' @request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7'
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
response.should be_redirect response.should be_redirect
response.location.should match /^#{aspects_url}\??$/ response.location.should match /^#{multi_url}\??$/
end end
it 'queues up an update job' do it 'queues up an update job' do
......
...@@ -72,8 +72,8 @@ describe NotificationsHelper do ...@@ -72,8 +72,8 @@ describe NotificationsHelper do
end end
it 'includes the boilerplate translation' do it 'includes the boilerplate translation' do
output = object_link(@notification, notification_people_link(@notification)) output = object_link(@notification, notification_people_link(@notification))
output.should include t("#{@notification.popup_translation_key}.one", output.should include t("#{@notification.popup_translation_key}.two",
:actors => notification_people_link(@notification), :actors => notification_people_link(@notification),
:post_link => "<a href=\"#{post_path(@post)}\" class=\"hard_object_link\" data-ref=\"#{@post.id}\">#{t('notifications.post')}</a>") :post_link => "<a href=\"#{post_path(@post)}\" class=\"hard_object_link\" data-ref=\"#{@post.id}\">#{t('notifications.post')}</a>")
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter