diff --git a/app/views/features/merge.html.erb b/app/views/features/merge.html.erb index 16d7271d..e87fae9d 100644 --- a/app/views/features/merge.html.erb +++ b/app/views/features/merge.html.erb @@ -6,6 +6,7 @@

Removing from file

Adding to file

+ <%= link_to 'Dry-run', file_merge_feature_path(@feature, :dry_run => true) %> <%= link_to 'Patch', file_merge_feature_path(@feature) %> diff --git a/app/views/features/system_merge.html.erb b/app/views/features/system_merge.html.erb index 1d67d1c4..6d062968 100644 --- a/app/views/features/system_merge.html.erb +++ b/app/views/features/system_merge.html.erb @@ -2,6 +2,10 @@ <%= stylesheet_link_tag "pretty_diff" %> <% end %> +
+

Adding to system

+

Removing from system

+
<%= link_to 'Update', system_sync_feature_path(@feature) %> diff --git a/spec/views/features/system_merge.html.erb_spec.rb b/spec/views/features/system_merge.html.erb_spec.rb index dbdc9f3f..770986e3 100644 --- a/spec/views/features/system_merge.html.erb_spec.rb +++ b/spec/views/features/system_merge.html.erb_spec.rb @@ -15,5 +15,21 @@ it "should have a link to update the system feature" do response.should have_selector :a, attributes = {:href => system_sync_feature_path(@feature)} end + + it "should have a legend displaying system changes as green" do + response.should have_selector :div, attribute = {:class => "legend highlighttable"} do |legend_wrapper| + legend_wrapper.should have_selector :p, attribute = {:class => "gi"} do |content| + content.should contain "Adding to system" + end + end + end + + it "should have a legend displaying file changes as red" do + response.should have_selector :div, attribute = {:class => "legend highlighttable"} do |legend_wrapper| + legend_wrapper.should have_selector :p, attribute = {:class => "gd"} do |content| + content.should contain "Removing from system" + end + end + end end end \ No newline at end of file