diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-20 11:59:59 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-20 12:39:27 -0200 |
commit | 3d52e139b13ad077286f2f9f46b7e98f43ad9564 (patch) | |
tree | 22c70561b0f64851d938e44661aafeed3a2c80b2 /spec/models | |
parent | 408e010d65e7e2e2b64a694e12d44636d7d81dec (diff) | |
download | gitlab-ce-3d52e139b13ad077286f2f9f46b7e98f43ad9564.tar.gz |
Rename Tasks to Todos
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/note_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/todo_spec.rb.rb (renamed from spec/models/task_spec.rb) | 8 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 70c3a999c95..583937ca748 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -27,7 +27,7 @@ describe Note, models: true do it { is_expected.to belong_to(:noteable) } it { is_expected.to belong_to(:author).class_name('User') } - it { is_expected.to have_many(:tasks).dependent(:destroy) } + it { is_expected.to have_many(:todos).dependent(:destroy) } end describe 'validation' do diff --git a/spec/models/task_spec.rb b/spec/models/todo_spec.rb.rb index 2bbd47c5e8a..ac481bf9fbd 100644 --- a/spec/models/task_spec.rb +++ b/spec/models/todo_spec.rb.rb @@ -1,6 +1,6 @@ # == Schema Information # -# Table name: tasks +# Table name: todos # # id :integer not null, primary key # user_id :integer not null @@ -17,7 +17,7 @@ require 'spec_helper' -describe Task, models: true do +describe Todo, models: true do describe 'relationships' do it { is_expected.to belong_to(:author).class_name("User") } it { is_expected.to belong_to(:note) } @@ -39,13 +39,13 @@ describe Task, models: true do describe '#action_name' do it 'returns proper message when action is an assigment' do - subject.action = Task::ASSIGNED + subject.action = Todo::ASSIGNED expect(subject.action_name).to eq 'assigned' end it 'returns proper message when action is a mention' do - subject.action = Task::MENTIONED + subject.action = Todo::MENTIONED expect(subject.action_name).to eq 'mentioned you on' end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index d2769836526..32d4f39b04a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -92,7 +92,7 @@ describe User, models: true do it { is_expected.to have_many(:identities).dependent(:destroy) } it { is_expected.to have_one(:abuse_report) } it { is_expected.to have_many(:spam_logs).dependent(:destroy) } - it { is_expected.to have_many(:tasks).dependent(:destroy) } + it { is_expected.to have_many(:todos).dependent(:destroy) } end describe 'validations' do |