Commit 8937f088d18b338ed99fd2d05ec42be235cef58c
1 parent
4a3a6052
Exists in
master
and in
1 other branch
Fix current minor rubocop style warnings
Showing
2 changed files
with
11 additions
and
14 deletions
Show diff stats
db/migrate/201510290041_extract_issue_tracker.rb
1 | 1 | class ExtractIssueTracker < Mongoid::Migration |
2 | - | |
3 | 2 | TRACKER_MAPPING = { |
4 | 3 | 'ErrbitTracPlugin::IssueTracker' => 'trac', |
5 | 4 | 'IssueTrackers::BitbucketIssuesTracker' => 'bitbucket', |
... | ... | @@ -26,18 +25,18 @@ class ExtractIssueTracker < Mongoid::Migration |
26 | 25 | updated_at = options.delete('updated_at') |
27 | 26 | created_at = options.delete('created_at') |
28 | 27 | |
29 | - if TRACKER_MAPPING.include?(type) | |
30 | - tracker = { | |
31 | - 'type_tracker' => TRACKER_MAPPING[type], | |
32 | - 'options' => options, | |
33 | - 'updated_at' => updated_at, | |
34 | - 'created_at' => created_at | |
35 | - } | |
28 | + next unless TRACKER_MAPPING.include?(type) | |
29 | + | |
30 | + tracker = { | |
31 | + 'type_tracker' => TRACKER_MAPPING[type], | |
32 | + 'options' => options, | |
33 | + 'updated_at' => updated_at, | |
34 | + 'created_at' => created_at | |
35 | + } | |
36 | 36 | |
37 | - App.where({ _id: app.id }).update({ | |
38 | - "$set" => { :issue_tracker => tracker } | |
39 | - }) | |
40 | - end | |
37 | + App.where({ _id: app.id }).update({ | |
38 | + "$set" => { :issue_tracker => tracker } | |
39 | + }) | |
41 | 40 | end |
42 | 41 | end |
43 | 42 | ... | ... |
spec/views/problems/index.html.haml_spec.rb
... | ... | @@ -22,7 +22,6 @@ describe "problems/index.html.haml", type: 'view' do |
22 | 22 | end |
23 | 23 | |
24 | 24 | describe "show/hide resolved button behavior" do |
25 | - | |
26 | 25 | it "displays unresolved errors title and button" do |
27 | 26 | allow(view).to receive(:all_errs).and_return(false) |
28 | 27 | render |
... | ... | @@ -36,6 +35,5 @@ describe "problems/index.html.haml", type: 'view' do |
36 | 35 | expect(view.content_for :title).to match 'All Errors' |
37 | 36 | expect(view.content_for :action_bar).to have_link 'hide resolved' |
38 | 37 | end |
39 | - | |
40 | 38 | end |
41 | 39 | end | ... | ... |