OSDN Git Service

mini fix
authoryasushiito <yas@pen-chan.jp>
Sat, 22 Dec 2012 07:05:18 +0000 (16:05 +0900)
committeryasushiito <yas@pen-chan.jp>
Sat, 22 Dec 2012 07:05:18 +0000 (16:05 +0900)
app/models/provider_status.rb
app/views/home/index.html.erb
config/locales/pettanr.ja.yml
spec/controllers/demander_statuses_controller_spec.rb
spec/controllers/demanders_controller_spec.rb

index 0c71768..3902804 100644 (file)
@@ -104,4 +104,9 @@ class ProviderStatus < ActiveRecord::Base
     {:include => {:provider => {}} }
   end
   
+  def stop
+    self.token = nil
+    self.save
+  end
+  
 end
index bff696c..749dcc7 100644 (file)
@@ -54,5 +54,7 @@
     </tr>
   </table>
 <% else -%>
-  <h2><%= t('artist.noregister') -%></h2>
+  <h2><%= t('.artist') -%></h2>
+  <h3><%= t('.updated_picture') -%></h3>
+  <h3><%= link_to t('.not_artist'), main_app.new_artist_path -%></h2>
 <% end -%>
index d835c6d..9d3ade9 100644 (file)
@@ -390,6 +390,8 @@ ja:
       updated_comic: 最近更新した漫画
       used_element: 最近使った部品
       updated_picture: 最近更新した画像
+      artist: 絵師
+      not_artist: 画像を公開するには絵師登録
     comic:
       title: 最近更新したコミック
     story:
index 70e99e1..c506c7c 100644 (file)
@@ -291,6 +291,10 @@ describe DemanderStatusesController do
           put :update, :id => @ds.id, :demander_status => @attr
           response.should redirect_to(@ds)
         end
+        it '一時的メッセージに処理成功を設定する' do
+          put :update, :id => @ds.id, :demander_status => @attr
+          flash[:notice].should eq I18n.t('demander_statuses.flash.notice.approved')
+        end
       end
       context 'json形式' do
         before do
@@ -386,13 +390,13 @@ describe DemanderStatusesController do
           delete :destroy, :id => @ds.id
           response.status.should eq 302
         end
-        it '貸与状況閲覧(show)ページに遷移するする' do
+        it '貸与状況閲覧(show)ページに遷移する' do
           delete :destroy, :id => @ds.id
           response.should redirect_to(@ds)
         end
         it '一時的メッセージに処理成功を設定する' do
           delete :destroy, :id => @ds.id
-          flash[:notice].should match /success/
+          flash[:notice].should eq I18n.t('demander_statuses.flash.notice.rejected')
         end
       end
       context 'json形式' do
@@ -443,7 +447,7 @@ describe DemanderStatusesController do
         end
         it '一時的メッセージに処理失敗を設定する' do
           delete :destroy, :id => @ds.id
-          flash[:notice].should match /not/
+          flash[:notice].should eq I18n.t('demander_statuses.flash.notice.not_rejected')
         end
       end
       context 'json形式' do
index c5f513f..4a93d35 100644 (file)
@@ -430,7 +430,7 @@ describe DemandersController do
         end
         it '一時的メッセージに処理成功を設定する' do
           post :req
-          flash[:notice].should match /success/
+          flash[:notice].should eq I18n.t('demanders.flash.notice.requested')
         end
       end
       context 'json形式' do
@@ -483,7 +483,7 @@ describe DemandersController do
         end
         it '一時的メッセージに処理失敗を設定する' do
           post :req
-          flash[:notice].should match /not/
+          flash[:notice].should eq I18n.t('demanders.flash.notice.not_requested')
         end
       end
       context 'json形式' do
@@ -536,7 +536,7 @@ describe DemandersController do
         end
         it '一時的メッセージに処理成功を設定する' do
           delete :destroy, :id => @demander.id
-          flash[:notice].should match /success/
+          flash[:notice].should eq I18n.t('demanders.flash.notice.stopped')
         end
       end
       context 'json形式' do
@@ -586,7 +586,7 @@ describe DemandersController do
         end
         it '一時的メッセージに処理失敗を設定する' do
           delete :destroy, :id => @demander.id
-          flash[:notice].should match /not/
+          flash[:notice].should eq I18n.t('demanders.flash.notice.not_stopped')
         end
       end
       context 'json形式' do