From the spec: describe 'user show page' do
it 'shows all a single users tweets' do
user = User.create(:username => "becky567", :email => "starz@aol.com", :password => "kittens")
tweet1 = Tweet.create(:content => "tweeting!", :user_id => user.id)
tweet2 = Tweet.create(:content => "tweet tweet tweet", :user_id => user.id)
get "/users/#{user.slug}"
expect(last_response.body).to include("tweeting!")
expect(last_response.body).to include("tweet tweet tweet")
end
I don't see any specification that the users show page is supposed to use the id. Based on Twitter, the user's show page uses a slug. The test appears to pass either way.
From the spec: describe 'user show page' do it 'shows all a single users tweets' do user = User.create(:username => "becky567", :email => "starz@aol.com", :password => "kittens") tweet1 = Tweet.create(:content => "tweeting!", :user_id => user.id) tweet2 = Tweet.create(:content => "tweet tweet tweet", :user_id => user.id) get "/users/#{user.slug}"
Whats a slug? Shouldnt it be 'id' instead?