diff options
Diffstat (limited to 'spec/requests/snippets_spec.rb')
-rw-r--r-- | spec/requests/snippets_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/requests/snippets_spec.rb b/spec/requests/snippets_spec.rb index 9ef217ba62c..b231b940a84 100644 --- a/spec/requests/snippets_spec.rb +++ b/spec/requests/snippets_spec.rb @@ -48,11 +48,11 @@ describe "Snippets" do page.current_path.should == new_project_snippet_path(project) end - describe "fill in" do + describe "fill in", js: true do before do fill_in "snippet_title", with: "login function" fill_in "snippet_file_name", with: "test.rb" - fill_in "snippet_content", with: "def login; end" + page.execute_script("editor.insert('def login; end');") end it { expect { click_button "Save" }.to change {Snippet.count}.by(1) } @@ -83,7 +83,6 @@ describe "Snippets" do before do fill_in "snippet_title", with: "login function" fill_in "snippet_file_name", with: "test.rb" - fill_in "snippet_content", with: "def login; end" end it { expect { click_button "Save" }.to_not change {Snippet.count} } |