From 2ce2fde7db39f66bff7a8093150ed16e3619af16 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Mon, 28 May 2012 16:01:21 +0100 Subject: Use a fixture for the external request --- spec/controllers/api_controller_spec.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'spec/controllers/api_controller_spec.rb') diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index cd47cc2f2..e5422d48a 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -74,8 +74,8 @@ describe ApiController, "when using the API" do end it "should add a response to a request" do - # First we need to create a request - request_id = _create_request + # First we need an external request + request_id = info_requests(:external_request).id # Initially it has no incoming messages IncomingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 0 @@ -104,7 +104,7 @@ describe ApiController, "when using the API" do it "should add a followup to a request" do # First we need to create a request - request_id = _create_request + request_id = info_requests(:external_request).id # Initially it has one outgoing message OutgoingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 1 @@ -172,7 +172,11 @@ describe ApiController, "when using the API" do OutgoingMessage.count.should == n_outgoing_messages end - it "should allow attachments to be uploaded" do + it "should not allow files to be attached to a followup" do + + end + + it "should allow files to be attached to a response" do end -- cgit v1.2.3