diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-20 10:46:57 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-20 10:46:57 +0100 |
commit | 6c4c822ef7a4491bf821326af779e5be9118c0a1 (patch) | |
tree | 39cf3564b1b2fb6be26499eda2a41be7ba59ad65 /spec/controllers/user_controller_spec.rb | |
parent | ea977a0b9e86bc99a84de8577fa4ce1d304ac489 (diff) | |
parent | 08dac0261325cd757b7146f9626f3c7b48cc672c (diff) |
Merge branch 'release/0.6'0.6
Conflicts:
locale/bs/app.po
locale/ca/app.po
locale/cs/app.po
locale/cy/app.po
locale/de/app.po
locale/en_IE/app.po
locale/es/app.po
locale/eu/app.po
locale/fr/app.po
locale/ga_IE/app.po
locale/gl/app.po
locale/hu_HU/app.po
locale/id/app.po
locale/pt_BR/app.po
locale/sq/app.po
locale/sr@latin/app.po
spec/fixtures/locale/en/app.po
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 40649b6e1..32398c053 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -1,8 +1,6 @@ # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -require 'json' - # XXX Use route_for or params_from to check /c/ links better # http://rspec.rubyforge.org/rspec-rails/1.1.12/classes/Spec/Rails/Example/ControllerExampleGroup.html @@ -267,7 +265,7 @@ describe UserController, "when signing up" do deliveries = ActionMailer::Base.deliveries deliveries.size.should == 1 - deliveries[0].body.should include("No revelaremos su dirección de correo") + deliveries[0].body.should include("No revelaremos") end it "should send special 'already signed up' mail if you fill the form in with existing registered email" do @@ -632,6 +630,41 @@ describe UserController, "when showing JSON version for API" do end +describe UserController, "when viewing the wall" do + integrate_views + + before(:each) do + rebuild_xapian_index + end + + it "should show users stuff on their wall, most recent first" do + user = users(:silly_name_user) + ire = info_request_events(:useless_incoming_message_event) + ire.created_at = DateTime.new(2001,1,1) + session[:user_id] = user.id + get :wall, :url_name => user.url_name + assigns[:feed_results][0].should_not == ire + + ire.created_at = Time.now + ire.save! + get :wall, :url_name => user.url_name + assigns[:feed_results][0].should == ire + end + it "should show other users' activities on their walls" do + user = users(:silly_name_user) + ire = info_request_events(:useless_incoming_message_event) + get :wall, :url_name => user.url_name + assigns[:feed_results][0].should_not == ire + end + it "should allow users to turn their own email alerts on and off" do + user = users(:silly_name_user) + session[:user_id] = user.id + user.receive_email_alerts.should == true + get :set_receive_email_alerts, :receive_email_alerts => 'false', :came_from => "/" + user.reload + user.receive_email_alerts.should_not == true + end +end |