foreman-docker / test / integration / container_steps_test.rb @ ef3feba4
1 |
require 'integration_test_helper'
|
---|---|
2 |
|
3 |
class ContainerStepsTest < ActionDispatch::IntegrationTest |
4 |
test 'shows a link to a new compute resource if none is available' do |
5 |
visit new_container_path |
6 |
assert has_selector?("div.alert", :text => 'Please add a new one') |
7 |
end
|
8 |
|
9 |
test 'shows taxonomies tabs' do |
10 |
visit new_container_path |
11 |
assert has_selector?("a", :text => 'Locations') if SETTINGS[:locations_enabled] |
12 |
assert has_selector?("a", :text => 'Organizations') if SETTINGS[:organizations_enabled] |
13 |
end
|
14 |
# test 'clicking on search loads repositories' do
|
15 |
# Capybara.javascript_driver = :webkit
|
16 |
# container = FactoryGirl.create(:container)
|
17 |
# visit container_step_path(:container_id => container.id, :id => :repository)
|
18 |
# ComputeResource.any_instance.expects(:search).returns([{'name' => 'my_fake_repository_result',
|
19 |
# 'star_count' => 300,
|
20 |
# 'description' => 'fake repository'}])
|
21 |
# click_button 'search_repository'
|
22 |
# assert has_link? 'my_fake_repository_result'
|
23 |
# end
|
24 |
end
|