blob: b97df69d5ce54340cc45ba428193f1f00f274faa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminOutgoingMessageController do
render_views
before { basic_auth_login @request }
before(:each) do
load_raw_emails_data
end
it "edits an outgoing message" do
get :edit, :id => outgoing_messages(:useless_outgoing_message)
end
it "saves edits to an outgoing_message" do
outgoing_messages(:useless_outgoing_message).body.should include("fancy dog")
post :update, { :id => outgoing_messages(:useless_outgoing_message), :outgoing_message => { :body => "Why do you have such a delicious cat?" } }
request.flash[:notice].should include('successful')
ir = OutgoingMessage.find(outgoing_messages(:useless_outgoing_message).id)
ir.body.should include("delicious cat")
end
end
|