Revision 387babdd
Added by Daniel Lobato Garcia over 8 years ago
test/functionals/container_controller_test.rb | ||
---|---|---|
24 | 24 |
:id => container.id }, set_session_user |
25 | 25 |
assert_redirected_to containers_path |
26 | 26 |
end |
27 |
|
|
28 |
test 'committing a managed container' do |
|
29 |
container = FactoryGirl.create(:container) |
|
30 |
request.env['HTTP_REFERER'] = container_path(:id => container.id) |
|
31 |
commit_hash = { :author => 'a', :repo => 'b', :tag => 'c', :comment => 'd' } |
|
32 |
|
|
33 |
mock_container = mock |
|
34 |
::Docker::Container.expects(:get).with(container.uuid).returns(mock_container) |
|
35 |
mock_container.expects(:commit).with(commit_hash) |
|
36 |
|
|
37 |
post :commit, { :commit => commit_hash, |
|
38 |
:id => container.id }, set_session_user |
|
39 |
end |
|
27 | 40 |
end |
Also available in: Unified diff
Fixes #8035: Commit container changes