master
 1require "rails_helper"
 2
 3describe "uploading a new creation", :js => true do
 4  let!(:user) { create(:user, password: "password") }
 5  let!(:category_1) { create(:category) }
 6  let!(:category_2) { create(:category) }
 7
 8  before :each do
 9    visit login_path
10    within('.form-inline') do
11      fill_in('session_email', with: user.email)
12      fill_in('session_password', with: "password")
13    end
14    click_button("Sign In")
15    click_link("Add Creation")
16    wait_for_ajax
17    within(".form-horizontal") do
18      fill_in("cake_name", with: "yummy cake")
19      select(category_2.name, from: 'cake_category_id')
20    end
21    click_button("Create")
22  end
23
24  xit "should get them to the image upload page" do
25    expect(page).to have_text("yummy cake")
26  end
27end