+ assert_no_content @deleted_entry.title
+ end
+
+ test "deleted diary comments should be hidden for regular users" do
+ @deleted_comment = create(:diary_comment, :diary_entry => @diary_entry, :visible => false)
+
+ sign_in_as(create(:user))
+ visit diary_entry_path(@diary_entry.user, @diary_entry)
+
+ assert_no_content @deleted_comment.body
+ end
+
+ test "deleted diary comments should be shown to administrators" do
+ @deleted_comment = create(:diary_comment, :diary_entry => @diary_entry, :visible => false)
+
+ sign_in_as(create(:administrator_user))
+ visit diary_entry_path(@diary_entry.user, @diary_entry)
+
+ assert_content @deleted_comment.body
+ end
+
+ test "should have links to preferred languages" do
+ sign_in_as(create(:user, :languages => %w[en-US pt-BR]))
+ visit diary_entries_path
+
+ assert_link "Diary Entries in English", :href => "/diary/en"
+ assert_link "Diary Entries in Brazilian Portuguese", :href => "/diary/pt-BR"
+ assert_link "Diary Entries in Portuguese", :href => "/diary/pt"
+ assert_no_link "Diary Entries in Russian"