foreman-docker / test / integration / container_steps_test.rb @ 7ff105d1
1 | 6225eda9 | Daniel Lobato | require 'test_helper'
|
---|---|---|---|
2 | |||
3 | class ContainerStepsTest < ActionDispatch::IntegrationTest |
||
4 | 7ff105d1 | David Davis | test 'shows a link to a new compute resource if none is available' do |
5 | 6225eda9 | Daniel Lobato | visit new_container_path |
6 | assert has_selector?("div.alert", :text => 'Please add a new one') |
||
7 | end
|
||
8 | |||
9 | 7ff105d1 | David Davis | test 'shows taxonomies tabs' do |
10 | 30891c0a | Daniel Lobato | visit new_container_path |
11 | d5d9d39e | Shlomi Zadok | assert has_selector?("a", :text => 'Locations') if SETTINGS[:locations_enabled] |
12 | assert has_selector?("a", :text => 'Organizations') if SETTINGS[:organizations_enabled] |
||
13 | 30891c0a | Daniel Lobato | end
|
14 | c57dae56 | David Davis | # test 'clicking on search loads repositories' do
|
15 | 6225eda9 | Daniel Lobato | # Capybara.javascript_driver = :webkit
|
16 | # container = FactoryGirl.create(:container)
|
||
17 | c57dae56 | David Davis | # 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 | 6225eda9 | Daniel Lobato | # end
|
24 | end |