Skip to content

Commit

Permalink
Spec for displaying associated playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Jun 28, 2017
1 parent c97cb17 commit 823a547
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/controllers/ansible_repository_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@
is_expected.to render_template(:partial => "layouts/_gtl")
end
end

context "#show_association" do
before(:each) do
stub_user(:features => :all)
@repository = FactoryGirl.create(:embedded_ansible_configuration_script_source)
@playbook = FactoryGirl.create(:embedded_playbook, :name => 'playbook_name')
@playbook.parent_id = @repository.id
end

it "shows associated playbooks" do
get :show, :params => {:id => @repository.id, :display => 'playbooks'}
expect(response.status).to eq(200)
expect(response).to render_template('ansible_repository/show')
end
end
end

0 comments on commit 823a547

Please sign in to comment.