Skip to content

Commit 19cc35a

Browse files
committed
spec for Message#to_param
1 parent 6c7621e commit 19cc35a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

spec/models/message.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'spec_helper'
2+
3+
describe Message do
4+
subject {Fabricate.build(:message)}
5+
6+
describe '#to_param' do
7+
it 'has the email attribute' do
8+
subject.to_param[:email].should == subject.email
9+
end
10+
11+
it'has the subject attribute' do
12+
subject.to_param[:subject].should == subject.subject
13+
end
14+
15+
it 'has the body attribute' do
16+
subject.to_param[:body].should == subject.body
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)