Commit 10526031 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix users feature spec

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 6b90ccb9
......@@ -46,14 +46,8 @@ feature 'Users', feature: true do
scenario '/u/user1 redirects to user page' do
visit '/u/user1'
expect_user_show_page
end
scenario '/users/user1 redirects to user page' do
visit '/users/user1'
expect_user_show_page
expect(current_path).to eq user_path(user)
expect(page).to have_text(user.name)
end
end
......@@ -64,9 +58,4 @@ feature 'Users', feature: true do
def number_of_errors_on_page(page)
page.find('#error_explanation').find('ul').all('li').count
end
def expect_user_show_page
expect(current_path).to eq user_path(user)
expect(page).to have_text(user.name)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment