Skip to content

Commit

Permalink
disable message_board.
Browse files Browse the repository at this point in the history
added messages to fixtures.
cleaned up messages fixtures.
  • Loading branch information
Jared Ning committed Mar 15, 2009
1 parent f8afd67 commit b5d5049
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/views/shared/_sidebar.rhtml
Expand Up @@ -48,7 +48,7 @@
<%= link_to_my_bracket %><br/>
<% end -%>
<%= link_to("tourney info", 'http://ordinaryzelig.org/march_madness_2009') %><br/>
<%= link_to("message board", :controller => "message_board") %><br/>
<%# link_to("message board", :controller => "message_board") %>
<% end -%>
<hr />
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/fixtures.rb
Expand Up @@ -15,7 +15,8 @@
'pool_users',
'bids',
'pics',
'accounts'
'accounts',
'messages'
]

FIXTURES[:movie] = [
Expand Down
10 changes: 5 additions & 5 deletions test/fixtures/messages.yml
Expand Up @@ -2,24 +2,24 @@
one:
subject: one
body: uno
user_id: <%= Fixtures.identify(:ten_cent) %>
user: ten_cent

two:
subject: two
body: dos
user_id: <%= Fixtures.identify(:ten_cent) %>
user: ten_cent

three:
subject: three
body: tres
user_id: <%= Fixtures.identify(:ten_cent) %>
user: ten_cent

by_Surly_Stuka:
subject: me better
body: than you
user_id: <%= Fixtures.identify(:Surly_Stuka) %>
user: Surly_Stuka

read_by_ten_cent:
subject: lower seeds?
body: what if i pick all lower seeds?
user_id: <%= Fixtures.identify(:Surly_Stuka) %>
user: Surly_Stuka
3 changes: 2 additions & 1 deletion test/functional/message_board_controller_test.rb
Expand Up @@ -2,6 +2,7 @@

class MessageBoardControllerTest < ActionController::TestCase


fixtures FIXTURES[:user]
fixtures :messages

end
2 changes: 2 additions & 0 deletions test/unit/message_test.rb
Expand Up @@ -22,4 +22,6 @@ class MessageTest < ActiveSupport::TestCase
:guid => proc { |obj| "Message_#{obj.id}" },
:author => proc { |obj| obj.user }

test_fixture_associations :user, &:subject

end

0 comments on commit b5d5049

Please sign in to comment.