SHARE
TWEET

Untitled

a guest Mar 10th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. describe 'Authenticated user as author', js: true do
  2.     background do
  3.       sign_in user
  4.       visit question_path(question)
  5.  
  6.       click_on 'Edit question'
  7.     end
  8.  
  9.     scenario 'edit his question' do
  10.       within '.question' do
  11.         fill_in 'Title', with: 'edited title'
  12.         fill_in 'Body', with: 'edited body'
  13.         click_on 'Save question'
  14.  
  15.         expect(page).to_not have_content question.title
  16.         expect(page).to_not have_content question.body
  17.         expect(page).to have_content 'edited title'
  18.         expect(page).to_not have_selector 'textarea'
  19.       end
  20.     end
  21. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top