Fixed migration, test for MR

This commit is contained in:
Dmitriy Zaporozhets 2012-03-15 19:39:03 +02:00
parent 5a3f23f395
commit a4993f16c0
3 changed files with 18 additions and 4 deletions

View file

@ -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 file

@ -50,8 +50,22 @@ ActiveRecord::Schema.define(:version => 20120315132931) do
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 file

@ -42,7 +42,7 @@ describe "MergeRequests" do
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