Browse files

Fixed migration, test for MR

  • Loading branch information...
1 parent 5a3f23f commit a4993f16c0239c8615b8d068c6e53415209f8cb1 @randx randx committed Mar 15, 2012
Showing with 18 additions and 4 deletions.
  1. +1 −1 db/migrate/20120315132931_add_merged_to_merge_request.rb
  2. +16 −2 db/schema.rb
  3. +1 −1 spec/requests/merge_requests_spec.rb
View
2 db/migrate/20120315132931_add_merged_to_merge_request.rb
@@ -1,5 +1,5 @@
class AddMergedToMergeRequest < ActiveRecord::Migration
def change
- add_column :merge_requests, :merged, :true, :null => false, :default => false
+ add_column :merge_requests, :merged, :boolean, :null => false, :default => false
end
end
View
18 db/schema.rb
@@ -50,8 +50,22 @@
t.integer "project_id"
end
-# Could not dump table "merge_requests" because of following StandardError
-# Unknown type 'true' for column 'merged'
+ create_table "merge_requests", :force => true do |t|
+ t.string "target_branch", :null => false
+ t.string "source_branch", :null => false
+ t.integer "project_id", :null => false
+ t.integer "author_id"
+ t.integer "assignee_id"
+ t.string "title"
+ t.boolean "closed", :default => false, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.text "st_commits"
+ t.text "st_diffs"
+ t.boolean "merged", :default => false, :null => false
+ end
+
+ add_index "merge_requests", ["project_id"], :name => "index_merge_requests_on_project_id"
create_table "notes", :force => true do |t|
t.text "note"
View
2 spec/requests/merge_requests_spec.rb
@@ -42,7 +42,7 @@
it { should have_content(@merge_request.title[0..10]) }
it "Show page should inform user that merge request closed" do
- page.should have_content "Reopen"
+ page.should have_content "Closed"
end
end
end

0 comments on commit a4993f1

Please sign in to comment.