Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe 'Authenticated user as author', js: true do
- background do
- sign_in user
- visit question_path(question)
- click_on 'Edit question'
- end
- scenario 'edit his question' do
- within '.question' do
- fill_in 'Title', with: 'edited title'
- fill_in 'Body', with: 'edited body'
- click_on 'Save question'
- expect(page).to_not have_content question.title
- expect(page).to_not have_content question.body
- expect(page).to have_content 'edited title'
- expect(page).to_not have_selector 'textarea'
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement