learn-co-curriculum / sinatra-fwitter-group-project

Other
2 stars 318 forks source link

Slug? #57

Closed JoeQuattrone closed 5 years ago

JoeQuattrone commented 5 years ago

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

Whats a slug? Shouldnt it be 'id' instead?

drakeltheryuujin commented 5 years ago

Hi there,

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.