Last active
April 1, 2016 20:19
-
-
Save zjhuntin/ea584a9f50165c6282ed865e2f53c955 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_create | |
binding.pry | |
product = mock | |
product.responds_like(Product) | |
product.expects(:add_repo).with( | |
'Fedora_Repository', | |
'Fedora Repository', | |
'http://www.google.com', | |
'yum', | |
true, | |
nil, | |
nil, | |
nil | |
).returns(@repository) | |
product.expects(:gpg_key).returns(nil) | |
product.expects(:organization).returns(@organization) | |
product.expects(:redhat?).returns(false) | |
assert_sync_task(::Actions::Katello::Repository::Create, @repository, false, true) | |
post :create, :name => 'Fedora Repository', | |
:product_id => @product.id, | |
:url => 'http://www.google.com', | |
:content_type => 'yum' | |
assert_response :success | |
assert_template 'api/v2/repositories/show' | |
product.find(@product.id) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment