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,7 +4,6 @@ | ||
4 | %th App | 4 | %th App |
5 | %th When | 5 | %th When |
6 | %th Who | 6 | %th Who |
7 | - %th Message | ||
8 | %th Repository | 7 | %th Repository |
9 | %th Revision | 8 | %th Revision |
10 | %tbody | 9 | %tbody |
@@ -15,6 +14,5 @@ | @@ -15,6 +14,5 @@ | ||
15 | %span.environment= deploy.environment | 14 | %span.environment= deploy.environment |
16 | %td.latest #{time_ago_in_words(deploy.created_at)} ago | 15 | %td.latest #{time_ago_in_words(deploy.created_at)} ago |
17 | %td.who #{deploy.username} | 16 | %td.who #{deploy.username} |
18 | - %td.message #{deploy.message} | ||
19 | %td.repository #{deploy.repository} | 17 | %td.repository #{deploy.repository} |
20 | %td.revision #{deploy.revision} | 18 | %td.revision #{deploy.revision} |
spec/controllers/deploys_controller_spec.rb
1 | require 'spec_helper' | 1 | require 'spec_helper' |
2 | 2 | ||
3 | describe DeploysController do | 3 | describe DeploysController do |
4 | + render_views | ||
4 | 5 | ||
5 | context 'POST #create' do | 6 | context 'POST #create' do |
6 | before do | 7 | before do |
@@ -38,5 +39,22 @@ describe DeploysController do | @@ -38,5 +39,22 @@ describe DeploysController do | ||
38 | end | 39 | end |
39 | 40 | ||
40 | end | 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 | end | 60 | end |
43 | \ No newline at end of file | 61 | \ No newline at end of file |