diff --git a/Gemfile.lock b/Gemfile.lock index a749d98..2b6a810 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -134,6 +134,8 @@ GEM racc (~> 1.4) nokogiri (1.13.7-x64-mingw-ucrt) racc (~> 1.4) + nokogiri (1.13.7-x86_64-darwin) + racc (~> 1.4) nokogiri (1.13.7-x86_64-linux) racc (~> 1.4) parallel (1.22.1) @@ -260,6 +262,7 @@ GEM PLATFORMS arm64-darwin-21 x64-mingw-ucrt + x86_64-darwin-21 x86_64-linux DEPENDENCIES diff --git a/README.md b/README.md index ab6209e..e1b8e69 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,12 @@ This project is build with: - Twitter: [@Evans_22J](https://twitter.com/Evans_22J) - LinkedIn: [@Evans Sitibekiso](https://www.linkedin.com/in/evans-sitibekiso/) +👤 **Edward Odhiambo** + +- GitHub: [@whit3d](https://github.com/white3d) +- Twitter: [@odhiambo_ed](https://twitter.com/odhiambo_ed) +- LinkedIn: [Edward Odhiambo](https://www.linkedin.com/in/edward-odhiambo-6a462a21b/) + ## 🤝 Contributor @@ -192,4 +198,4 @@ Give a ⭐️ if you like this project! ## 📝 License -This project is [MIT](https://github.com/microverseinc/readme-template/blob/master/MIT.md) licensed. +This project is [MIT](https://github.com/microverseinc/readme-template/blob/master/MIT.md) licensed diff --git a/spec/integration/user_index_spec.rb b/spec/integration/user_index_spec.rb index 7adf167..8210e41 100644 --- a/spec/integration/user_index_spec.rb +++ b/spec/integration/user_index_spec.rb @@ -31,5 +31,12 @@ expect(page).to have_content('3') expect(page).to have_content('5') end + + it 'redirects to users show page' do + visit root_path + click_link @first_user.name + expect(page).to have_content(@first_user.name) + expect(page).to have_content(@first_user.bio) + end end end diff --git a/spec/integration/user_show_spec.rb b/spec/integration/user_show_spec.rb index c84fb02..9f32e48 100644 --- a/spec/integration/user_show_spec.rb +++ b/spec/integration/user_show_spec.rb @@ -42,5 +42,18 @@ it 'should have button to show all posts' do expect(page).to have_link('See all posts') end + + it "redirects me to that post's show page." do + first('.post > a').click + expect(page).to have_content('Add a new comment') + find_button('like post') + expect(page).to have_content('Comments: 0 Likes: 0') + end + + it 'redirects me to the user post index page' do + click_button('See all posts') + expect(page).to have_content(@user.bio) + expect(page).to have_content("Number of posts: #{@user.posts_counter}") + end end end