2013-02-13 04:43:57 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
describe "Artifact Update" do
|
|
|
|
|
|
|
|
|
|
include UsesTempFiles
|
|
|
|
|
ARTIFACT_FILE='jkclient-0.1.1.exe'
|
|
|
|
|
|
|
|
|
|
subject { page }
|
|
|
|
|
|
2013-03-15 04:24:13 +00:00
|
|
|
let(:user) { FactoryGirl.create(:admin) }
|
2013-02-13 04:43:57 +00:00
|
|
|
before { sign_in user }
|
|
|
|
|
|
|
|
|
|
describe "crud" do
|
2013-10-16 17:28:44 +00:00
|
|
|
before { visit admin_artifacts_path }
|
|
|
|
|
it { should have_selector('h2', text: "Artifacts") }
|
2013-02-13 04:43:57 +00:00
|
|
|
|
|
|
|
|
describe "upload artifact" do
|
|
|
|
|
|
|
|
|
|
in_directory_with_file(ARTIFACT_FILE)
|
|
|
|
|
|
|
|
|
|
before do
|
2013-10-16 17:28:44 +00:00
|
|
|
visit new_admin_artifact_path
|
|
|
|
|
fill_in "artifacts_version", with: "1"
|
|
|
|
|
fill_in "artifacts_environment", with: "public"
|
|
|
|
|
select('JamClient/Win32', from: "artifacts_product")
|
|
|
|
|
fill_in "artifacts_environment", with: "public"
|
|
|
|
|
attach_file("artifacts_uri", ARTIFACT_FILE)
|
2013-02-13 04:43:57 +00:00
|
|
|
click_button "Create Artifact update"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it {
|
2013-10-16 17:28:44 +00:00
|
|
|
should have_selector('#main_content .panel:first-child h3', text: "Artifacts Details" ) }
|
2013-02-13 04:43:57 +00:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|