Commit 943c836a9f6234faf65c44c1d62b22c4e676fffa
1 parent
aa6c9cac
Exists in
master
and in
1 other branch
Specs for DeployController#index.
Showing
2 changed files
with
18 additions
and
2 deletions
Show diff stats
app/views/deploys/_table.html.haml
... | ... | @@ -4,7 +4,6 @@ |
4 | 4 | %th App |
5 | 5 | %th When |
6 | 6 | %th Who |
7 | - %th Message | |
8 | 7 | %th Repository |
9 | 8 | %th Revision |
10 | 9 | %tbody |
... | ... | @@ -15,6 +14,5 @@ |
15 | 14 | %span.environment= deploy.environment |
16 | 15 | %td.latest #{time_ago_in_words(deploy.created_at)} ago |
17 | 16 | %td.who #{deploy.username} |
18 | - %td.message #{deploy.message} | |
19 | 17 | %td.repository #{deploy.repository} |
20 | 18 | %td.revision #{deploy.revision} | ... | ... |
spec/controllers/deploys_controller_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | 3 | describe DeploysController do |
4 | + render_views | |
4 | 5 | |
5 | 6 | context 'POST #create' do |
6 | 7 | before do |
... | ... | @@ -38,5 +39,22 @@ describe DeploysController do |
38 | 39 | end |
39 | 40 | |
40 | 41 | end |
42 | + | |
43 | + context "GET #index" do | |
44 | + before(:each) do | |
45 | + @deploy = Factory :deploy | |
46 | + sign_in Factory(:admin) | |
47 | + get :index, :app_id => @deploy.app.id | |
48 | + end | |
49 | + | |
50 | + it "should render successfully" do | |
51 | + response.should be_success | |
52 | + end | |
53 | + | |
54 | + it "should contain info about existing deploy" do | |
55 | + response.body.should match(@deploy.revision) | |
56 | + response.body.should match(@deploy.app.name) | |
57 | + end | |
58 | + end | |
41 | 59 | |
42 | 60 | end |
43 | 61 | \ No newline at end of file | ... | ... |