File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
scenario 'Create an article' do
12
12
13
+ my_title = 'A new article title'
14
+ my_body = 'Something interesting to say'
15
+
13
16
within ( main_menubar ) { click_link 'Articles' }
14
17
within ( action_bar ) { click_link 'New Article' }
15
18
16
19
within page_body do
17
20
# This will fill visible fields i.e. for the default locale
18
- fill_in 'Title' , with : 'A new article title'
19
- fill_in 'Body' , with : 'Something interesting to say'
21
+ fill_in 'Title' , with : my_title
22
+ fill_in 'Body' , with : my_body
20
23
submit_button . click
21
24
end
22
25
23
26
page . should have_content 'Article was successfully created.'
24
27
25
28
# Retrieve created article from database
26
- article = Article . first
27
- page . should have_content article . title
28
- page . should have_content article . body
29
+ page . should have_content my_title
30
+ page . should have_content my_body
29
31
end
30
32
31
33
context 'Viewing article translations' do
You can’t perform that action at this time.
0 commit comments