aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/track_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-08-09 01:02:48 +0000
committerfrancis <francis>2008-08-09 01:02:48 +0000
commit25a4d44b61d103c9543392f362571248cc418d62 (patch)
tree87fa9124f89b03fc7b8692ae07979fe6596b2b30 /spec/controllers/track_controller_spec.rb
parent7809afeaafdca7289fa84bc35521dc01a3b483f0 (diff)
Fix up test code now we only have email tracks.
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r--spec/controllers/track_controller_spec.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 8cf11fde0..074d63b39 100644
--- a/spec/controllers/track_controller_spec.rb
+++ b/spec/controllers/track_controller_spec.rb
@@ -4,21 +4,8 @@ describe TrackController, "when making a new track on a request" do
integrate_views
fixtures :info_requests, :outgoing_messages, :incoming_messages, :info_request_events, :users
- it "should render with 'track_set' template" do
- get :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track'
- response.should render_template('track_set')
- end
-
- it "should assign the title" do
- get :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track'
-
- assigns[:title].should include("track the request")
- end
-
it "should require login when making new track" do
- post :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track',
- :track_thing => { :track_medium => "email_daily" },
- :submitted_track => 1
+ get :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track'
post_redirect = PostRedirect.get_last_post_redirect
response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token)
end
@@ -26,9 +13,7 @@ describe TrackController, "when making a new track on a request" do
it "should make track and redirect if you are logged in " do
TrackThing.count.should == 2
session[:user_id] = users(:bob_smith_user).id
- post :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track',
- :track_thing => { :track_medium => "email_daily" },
- :submitted_track => 1
+ get :track_request, :url_title => info_requests(:fancy_dog_request).url_title, :feed => 'track'
TrackThing.count.should == 3
response.should redirect_to(:controller => 'request', :action => 'show', :url_title => info_requests(:fancy_dog_request).url_title)
end