Fix users feature spec

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2016-10-06 15:34:30 +03:00
parent 6b90ccb9fd
commit 1052603148

View file

@ -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