Changes field for metadata. Needs to look at this test better.

This commit is contained in:
gaba
2016-12-23 15:38:45 -08:00
parent 6052cac1d3
commit d35875145c
4 changed files with 18 additions and 5 deletions
@@ -10,7 +10,11 @@ import CommentHistory from 'coral-plugin-history/CommentHistory';
import SettingsHeader from '../components/SettingsHeader';
import RestrictedContent from 'coral-framework/components/RestrictedContent';
class SignInContainer extends Component {
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../translations';
const lang = new I18n(translations);
class SettingsContainer extends Component {
constructor (props) {
super(props);
this.state = {
@@ -59,7 +63,7 @@ class SignInContainer extends Component {
? <CommentHistory
comments={commentsMostRecentFirst}
assets={user.myAssets.map(id => items.assets[id])} />
: <p>Loading comment history...</p>
: <p>{lang.t('user-no-comment')}</p>
}
</TabContent>
<TabContent show={activeTab === 1}>
@@ -83,4 +87,4 @@ const mapDispatchToProps = dispatch => ({
export default connect(
mapStateToProps,
mapDispatchToProps
)(SignInContainer);
)(SettingsContainer);
+8
View File
@@ -0,0 +1,8 @@
{
"en":{
"user-no-comment": "This user has not yet left a comment."
},
"es":{
"user-no-comment": "Aún no ha escrito ningún comentario."
}
}
+3 -2
View File
@@ -225,8 +225,9 @@ describe('/api/v1/comments', () => {
let action = actions[0];
expect(action).to.have.property('item_id', comment.id);
expect(action).to.have.property('field', 'body');
expect(action).to.have.property('detail', 'Matched suspect word filters.');
expect(action).to.have.property('metadata', 'body');
// expect(action).to.have.property('detail', 'Matched suspect word filters.');
});
});