Commit b3aae422 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Minor edits, incorporate review

parent 28910ffd
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
Create a Mattermost team for this group Create a Mattermost team for this group
%br %br
%small.light.js-toggle-content %small.light.js-toggle-content
Team URL: Mattermost URL:
= Settings.mattermost.host = Settings.mattermost.host
%span> / %span> /
%span{ "data-bind-out" => "create_chat_team" } %span{ "data-bind-out" => "create_chat_team" }
...@@ -8,13 +8,11 @@ class CreateChatTeams < ActiveRecord::Migration ...@@ -8,13 +8,11 @@ class CreateChatTeams < ActiveRecord::Migration
def change def change
create_table :chat_teams do |t| create_table :chat_teams do |t|
t.integer :namespace_id, index: true t.references :namespace, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade }
t.string :team_id t.string :team_id
t.string :name t.string :name
t.timestamps null: false t.timestamps null: false
end end
add_concurrent_foreign_key :chat_teams, :namespaces, column: :namespace_id
end end
end end
...@@ -173,14 +173,14 @@ ActiveRecord::Schema.define(version: 20170217151947) do ...@@ -173,14 +173,14 @@ ActiveRecord::Schema.define(version: 20170217151947) do
add_index "chat_names", ["user_id", "service_id"], name: "index_chat_names_on_user_id_and_service_id", unique: true, using: :btree add_index "chat_names", ["user_id", "service_id"], name: "index_chat_names_on_user_id_and_service_id", unique: true, using: :btree
create_table "chat_teams", force: :cascade do |t| create_table "chat_teams", force: :cascade do |t|
t.integer "namespace_id" t.integer "namespace_id", null: false
t.string "team_id" t.string "team_id"
t.string "name" t.string "name"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
end end
add_index "chat_teams", ["namespace_id"], name: "index_chat_teams_on_namespace_id", using: :btree add_index "chat_teams", ["namespace_id"], name: "index_chat_teams_on_namespace_id", unique: true, using: :btree
create_table "ci_application_settings", force: :cascade do |t| create_table "ci_application_settings", force: :cascade do |t|
t.boolean "all_broken_builds" t.boolean "all_broken_builds"
...@@ -1343,7 +1343,7 @@ ActiveRecord::Schema.define(version: 20170217151947) do ...@@ -1343,7 +1343,7 @@ ActiveRecord::Schema.define(version: 20170217151947) do
add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
add_foreign_key "boards", "projects" add_foreign_key "boards", "projects"
add_foreign_key "chat_teams", "namespaces", name: "fk_3b543909cb", on_delete: :cascade add_foreign_key "chat_teams", "namespaces", on_delete: :cascade
add_foreign_key "issue_metrics", "issues", on_delete: :cascade add_foreign_key "issue_metrics", "issues", on_delete: :cascade
add_foreign_key "label_priorities", "labels", on_delete: :cascade add_foreign_key "label_priorities", "labels", on_delete: :cascade
add_foreign_key "label_priorities", "projects", on_delete: :cascade add_foreign_key "label_priorities", "projects", on_delete: :cascade
......
...@@ -46,7 +46,10 @@ feature 'Group', feature: true do ...@@ -46,7 +46,10 @@ feature 'Group', feature: true do
describe 'Mattermost team creation' do describe 'Mattermost team creation' do
before do before do
Settings.mattermost['enabled'] = mattermost_enabled mash = Hashie::Mash.new
mash.enabled = mattermost_enabled
allow(Settings).to receive(:mattermost).and_return(mash)
visit new_group_path visit new_group_path
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment