From bdbadebe3e6e25180d8c1465dde4573fa0ecc389 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 15 Sep 2014 10:57:02 +0300 Subject: Fix adminarea and emails for new membership logic Signed-off-by: Dmitriy Zaporozhets --- spec/services/system_hooks_service_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/services/system_hooks_service_spec.rb') diff --git a/spec/services/system_hooks_service_spec.rb b/spec/services/system_hooks_service_spec.rb index 7497bdb0b3c..573446d3a19 100644 --- a/spec/services/system_hooks_service_spec.rb +++ b/spec/services/system_hooks_service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe SystemHooksService do let (:user) { create :user } let (:project) { create :project } - let (:users_project) { create :users_project } + let (:project_member) { create :project_member } let (:key) { create(:key, user: user) } context 'event data' do @@ -11,8 +11,8 @@ describe SystemHooksService do it { event_data(user, :destroy).should include(:event_name, :name, :created_at, :email, :user_id) } it { event_data(project, :create).should include(:event_name, :name, :created_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) } it { event_data(project, :destroy).should include(:event_name, :name, :created_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) } - it { event_data(users_project, :create).should include(:event_name, :created_at, :project_name, :project_path, :project_id, :user_name, :user_email, :project_access, :project_visibility) } - it { event_data(users_project, :destroy).should include(:event_name, :created_at, :project_name, :project_path, :project_id, :user_name, :user_email, :project_access, :project_visibility) } + it { event_data(project_member, :create).should include(:event_name, :created_at, :project_name, :project_path, :project_id, :user_name, :user_email, :access_level, :project_visibility) } + it { event_data(project_member, :destroy).should include(:event_name, :created_at, :project_name, :project_path, :project_id, :user_name, :user_email, :access_level, :project_visibility) } it { event_data(key, :create).should include(:username, :key, :id) } it { event_data(key, :destroy).should include(:username, :key, :id) } end @@ -22,8 +22,8 @@ describe SystemHooksService do it { event_name(user, :destroy).should eq "user_destroy" } it { event_name(project, :create).should eq "project_create" } it { event_name(project, :destroy).should eq "project_destroy" } - it { event_name(users_project, :create).should eq "user_add_to_team" } - it { event_name(users_project, :destroy).should eq "user_remove_from_team" } + it { event_name(project_member, :create).should eq "user_add_to_team" } + it { event_name(project_member, :destroy).should eq "user_remove_from_team" } it { event_name(key, :create).should eq 'key_create' } it { event_name(key, :destroy).should eq 'key_destroy' } end -- cgit v1.2.1