require 'spec_feature_helper'

describe 'creating a tool' do
  it 'is possible for users to create a tool' do
    sign_in(create(:user))

    visit '/'
    follow_relation 'view_profile'
    follow_relation 'view_tools'
    follow_relation 'add_tool'

    within '.new_tool' do
      fill_in 'tool_name', with: 'butter'
      choose 'Knife Plugin'
      fill_in 'tool_description', with: 'Easily cut with knife'
      fill_in 'tool_source_url', with: 'http://example.com'
      fill_in 'tool_instructions', with: 'Delicious with toast.'

      submit_form
    end

    expect_to_see_success_message
  end
end

Create the Tool creation feature spec.
Create the Tool creation feature spec.

[skip ci]
