diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-20 12:02:39 +0100 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-20 12:02:39 +0100 |
commit | 64232c71a402b17f38f5425d9e600e2650078ce3 (patch) | |
tree | 9ba719d41d2582f0d94864990773852b58f0f47b | |
parent | 81e57e783e8882de21d27d9191c09404ed7faca3 (diff) | |
download | gitlab-ce-64232c71a402b17f38f5425d9e600e2650078ce3.tar.gz |
updates local schema
-rw-r--r-- | db/schema.rb | 15 | ||||
-rw-r--r-- | spec/features/projects/branches_spec.rb~HEAD | 32 |
2 files changed, 40 insertions, 7 deletions
diff --git a/db/schema.rb b/db/schema.rb index 8882377f9f4..39b02d9ba35 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -84,7 +84,7 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.string "health_check_access_token" t.boolean "send_user_confirmation_email", default: false t.integer "container_registry_token_expire_delay", default: 5 - t.boolean "user_default_external", default: false, null: false + t.boolean "user_default_external", default: false, null: false t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" @@ -605,9 +605,9 @@ ActiveRecord::Schema.define(version: 20160716115710) do add_index "merge_request_diffs", ["merge_request_id"], name: "index_merge_request_diffs_on_merge_request_id", unique: true, using: :btree create_table "merge_requests", force: :cascade do |t| - t.string "target_branch", null: false - t.string "source_branch", null: false - t.integer "source_project_id", null: false + t.string "target_branch", null: false + t.string "source_branch", null: false + t.integer "source_project_id", null: false t.integer "author_id" t.integer "assignee_id" t.string "title" @@ -616,20 +616,21 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.integer "milestone_id" t.string "state" t.string "merge_status" - t.integer "target_project_id", null: false + t.integer "target_project_id", null: false t.integer "iid" t.text "description" - t.integer "position", default: 0 + t.integer "position", default: 0 t.datetime "locked_at" t.integer "updated_by_id" t.string "merge_error" t.text "merge_params" - t.boolean "merge_when_build_succeeds", default: false, null: false + t.boolean "merge_when_build_succeeds", default: false, null: false t.integer "merge_user_id" t.string "merge_commit_sha" t.datetime "deleted_at" t.string "in_progress_merge_commit_sha" end + add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree add_index "merge_requests", ["author_id"], name: "index_merge_requests_on_author_id", using: :btree add_index "merge_requests", ["created_at", "id"], name: "index_merge_requests_on_created_at_and_id", using: :btree diff --git a/spec/features/projects/branches_spec.rb~HEAD b/spec/features/projects/branches_spec.rb~HEAD new file mode 100644 index 00000000000..79abba21854 --- /dev/null +++ b/spec/features/projects/branches_spec.rb~HEAD @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'Branches', feature: true do + let(:project) { create(:project) } + let(:repository) { project.repository } + + before do + login_as :user + project.team << [@user, :developer] + end + + describe 'Initial branches page' do + it 'shows all the branches' do + visit namespace_project_branches_path(project.namespace, project) + + repository.branches { |branch| expect(page).to have_content("#{branch.name}") } + expect(page).to have_content("Protected branches can be managed in project settings") + end + end + + describe 'Find branches' do + it 'shows filtered branches', js: true do + visit namespace_project_branches_path(project.namespace, project, project.id) + + fill_in 'branch-search', with: 'fix' + find('#branch-search').native.send_keys(:enter) + + expect(page).to have_content('fix') + expect(find('.all-branches')).to have_selector('li', count: 1) + end + end +end |